/**
 *
 */
import Util;
import OpenApi;
import OpenApiUtil;
import EndpointUtil;

extends OpenApi;


init(config: OpenApi.Config){
  super(config);
  @endpointRule = 'regional';
  @endpointMap = {
    'ap-northeast-1' = 'green.ap-southeast-1.aliyuncs.com',
    'ap-south-1' = 'green.ap-southeast-1.aliyuncs.com',
    'ap-southeast-2' = 'green.ap-southeast-1.aliyuncs.com',
    'ap-southeast-3' = 'green.ap-southeast-1.aliyuncs.com',
    'ap-southeast-5' = 'green.ap-southeast-1.aliyuncs.com',
    'cn-chengdu' = 'green.aliyuncs.com',
    'cn-hongkong' = 'green.aliyuncs.com',
    'cn-huhehaote' = 'green.aliyuncs.com',
    'cn-qingdao' = 'green.aliyuncs.com',
    'cn-zhangjiakou' = 'green.aliyuncs.com',
    'eu-central-1' = 'green.ap-southeast-1.aliyuncs.com',
    'eu-west-1' = 'green.ap-southeast-1.aliyuncs.com',
    'me-east-1' = 'green.ap-southeast-1.aliyuncs.com',
    'us-east-1' = 'green.ap-southeast-1.aliyuncs.com',
    'cn-hangzhou-finance' = 'green.aliyuncs.com',
    'cn-shenzhen-finance-1' = 'green.aliyuncs.com',
    'cn-shanghai-finance-1' = 'green.aliyuncs.com',
    'cn-north-2-gov-1' = 'green.aliyuncs.com',
  };

  checkConfig(config);
  @endpoint = getEndpoint('green', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!Util.empty(endpoint)) {
    return endpoint;
  }
  
  if (!Util.isUnset(endpointMap) && !Util.empty(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return EndpointUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddAnswerSampleRequest {
  libId?: string(name='LibId', example='alxxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sampleObject?: string(name='SampleObject', example='data/xxx.xlsx'),
  samples?: string(name='Samples'),
}

model AddAnswerSampleResponseBody = {
  libId?: string(name='LibId', example='alxxxx'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  result?: {
    i18nKey?: string(name='I18nKey', example='xxx'),
    illegalLengthSamples?: [ string ](name='IllegalLengthSamples'),
    invalidCount?: int32(name='InvalidCount', example='118'),
    libId?: string(name='LibId', example='alxxxx'),
    progress?: int32(name='Progress', example='100'),
    repeatCount?: int32(name='RepeatCount', example='98'),
    repeatSamples?: [ string ](name='RepeatSamples'),
    successCount?: int32(name='SuccessCount', example='318'),
    taskId?: string(name='TaskId', example='alAxbbxxxx-xxx'),
    totalCount?: int32(name='TotalCount', example='534'),
  }(name='Result'),
  taskId?: string(name='TaskId', example='alAxbbxxxx-xxx'),
}

model AddAnswerSampleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddAnswerSampleResponseBody(name='body'),
}

/**
 * @summary 添加代答样本
 *
 * @param request AddAnswerSampleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddAnswerSampleResponse
 */
async function addAnswerSampleWithOptions(request: AddAnswerSampleRequest, runtime: Util.RuntimeOptions): AddAnswerSampleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.libId)) {
    query['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.sampleObject)) {
    query['SampleObject'] = request.sampleObject;
  }
  if (!Util.isUnset(request.samples)) {
    query['Samples'] = request.samples;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'AddAnswerSample',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加代答样本
 *
 * @param request AddAnswerSampleRequest
 * @return AddAnswerSampleResponse
 */
async function addAnswerSample(request: AddAnswerSampleRequest): AddAnswerSampleResponse {
  var runtime = new Util.RuntimeOptions{};
  return addAnswerSampleWithOptions(request, runtime);
}

model AddImageLibRequest {
  comment?: string(name='Comment'),
  libName?: string(name='LibName'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model AddImageLibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model AddImageLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddImageLibResponseBody(name='body'),
}

/**
 * @summary 创建图库
 *
 * @param request AddImageLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddImageLibResponse
 */
async function addImageLibWithOptions(request: AddImageLibRequest, runtime: Util.RuntimeOptions): AddImageLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.comment)) {
    body['Comment'] = request.comment;
  }
  if (!Util.isUnset(request.libName)) {
    body['LibName'] = request.libName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddImageLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建图库
 *
 * @param request AddImageLibRequest
 * @return AddImageLibResponse
 */
async function addImageLib(request: AddImageLibRequest): AddImageLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return addImageLibWithOptions(request, runtime);
}

model AddImages2LibRequest {
  imgUrl?: string(name='ImgUrl', example='upload/ea7a98f9-f8bd-4905-a79b-963c9da419c5.jpg'),
  libId?: string(name='LibId', example='xxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model AddImages2LibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    imgId?: string(name='ImgId', example='100001'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model AddImages2LibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddImages2LibResponseBody(name='body'),
}

/**
 * @summary 批量添加图片
 *
 * @param request AddImages2LibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddImages2LibResponse
 */
async function addImages2LibWithOptions(request: AddImages2LibRequest, runtime: Util.RuntimeOptions): AddImages2LibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.imgUrl)) {
    body['ImgUrl'] = request.imgUrl;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddImages2Lib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量添加图片
 *
 * @param request AddImages2LibRequest
 * @return AddImages2LibResponse
 */
async function addImages2Lib(request: AddImages2LibRequest): AddImages2LibResponse {
  var runtime = new Util.RuntimeOptions{};
  return addImages2LibWithOptions(request, runtime);
}

model AddKeywordLibRequest {
  keywords?: string(name='Keywords'),
  keywordsObject?: string(name='KeywordsObject', example='upload/1e5353c0-0d91-40ba-9d41-ae7abd3fe561.txt'),
  libName?: string(name='LibName'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model AddKeywordLibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    keywordsResult?: {
      i18nKey?: string(name='I18nKey', example='xxx'),
      illegalLengthKeywords?: [ string ](name='IllegalLengthKeywords'),
      invalidCount?: int32(name='InvalidCount', example='133'),
      invalidKeywords?: [ string ](name='InvalidKeywords'),
      libId?: string(name='LibId', example='customxx_xxxx'),
      repeatCount?: int32(name='RepeatCount', example='118'),
      repeatKeywords?: [ string ](name='RepeatKeywords'),
      successCount?: int32(name='SuccessCount', example='278'),
      tips?: string(name='Tips', example='xxx'),
      totalCount?: int32(name='TotalCount', example='529'),
    }(name='KeywordsResult'),
    libId?: string(name='LibId', example='customxx_xxxx'),
    taskId?: string(name='TaskId', example='xxxxx-xxxxx'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model AddKeywordLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddKeywordLibResponseBody(name='body'),
}

/**
 * @summary 创建关键词库
 *
 * @param request AddKeywordLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddKeywordLibResponse
 */
async function addKeywordLibWithOptions(request: AddKeywordLibRequest, runtime: Util.RuntimeOptions): AddKeywordLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.keywords)) {
    body['Keywords'] = request.keywords;
  }
  if (!Util.isUnset(request.keywordsObject)) {
    body['KeywordsObject'] = request.keywordsObject;
  }
  if (!Util.isUnset(request.libName)) {
    body['LibName'] = request.libName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddKeywordLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建关键词库
 *
 * @param request AddKeywordLibRequest
 * @return AddKeywordLibResponse
 */
async function addKeywordLib(request: AddKeywordLibRequest): AddKeywordLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return addKeywordLibWithOptions(request, runtime);
}

model AddKeywordsRequest {
  keywords?: string(name='Keywords'),
  keywordsObject?: string(name='KeywordsObject', example='upload/1e5353c0-0d91-40ba-9d41-ae7abd3fe561.txt'),
  libId?: string(name='LibId', example='customxx_xxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model AddKeywordsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    keywordsResult?: {
      i18nKey?: string(name='I18nKey', example='xxx'),
      illegalLengthKeywords?: [ string ](name='IllegalLengthKeywords'),
      invalidCount?: int32(name='InvalidCount', example='1'),
      invalidKeywords?: [ string ](name='InvalidKeywords'),
      libId?: string(name='LibId', example='customxx_xxxx'),
      progress?: int32(name='Progress', example='100'),
      repeatCount?: int32(name='RepeatCount', example='1'),
      repeatKeywords?: [ string ](name='RepeatKeywords'),
      successCount?: int32(name='SuccessCount', example='6'),
      tips?: string(name='Tips', example='xxxxx'),
      totalCount?: int32(name='TotalCount', example='8'),
    }(name='KeywordsResult'),
    libId?: string(name='LibId', example='customxx_xxxx'),
    taskId?: string(name='TaskId', example='xxxxx-xxxxx'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model AddKeywordsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddKeywordsResponseBody(name='body'),
}

/**
 * @summary 添加关键词
 *
 * @param request AddKeywordsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddKeywordsResponse
 */
async function addKeywordsWithOptions(request: AddKeywordsRequest, runtime: Util.RuntimeOptions): AddKeywordsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.keywords)) {
    body['Keywords'] = request.keywords;
  }
  if (!Util.isUnset(request.keywordsObject)) {
    body['KeywordsObject'] = request.keywordsObject;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddKeywords',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加关键词
 *
 * @param request AddKeywordsRequest
 * @return AddKeywordsResponse
 */
async function addKeywords(request: AddKeywordsRequest): AddKeywordsResponse {
  var runtime = new Util.RuntimeOptions{};
  return addKeywordsWithOptions(request, runtime);
}

model AddKeywordsToLibRequest {
  keywords?: string(name='Keywords'),
  keywordsObject?: string(name='KeywordsObject', example='upload/1e5353c0-0d91-40ba-9d41-ae7abd3fe561.txt'),
  libId?: string(name='LibId', example='customxx_xxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model AddKeywordsToLibResponseBody = {
  data?: {
    keywordsResult?: {
      i18nKey?: string(name='I18nKey', example='xxx'),
      illegalLengthKeywords?: [ string ](name='IllegalLengthKeywords'),
      invalidCount?: int32(name='InvalidCount', example='1'),
      invalidKeywords?: [ string ](name='InvalidKeywords'),
      libId?: string(name='LibId', example='customxx_xxxx'),
      progress?: int32(name='Progress', example='100'),
      repeatCount?: int32(name='RepeatCount', example='1'),
      repeatKeywords?: [ string ](name='RepeatKeywords'),
      successCount?: int32(name='SuccessCount', example='8'),
      totalCount?: int32(name='TotalCount', example='10'),
    }(name='KeywordsResult'),
    libId?: string(name='LibId', example='customxx_xxxx'),
    taskId?: string(name='TaskId', example='xxxxx-xxxxx'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model AddKeywordsToLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddKeywordsToLibResponseBody(name='body'),
}

/**
 * @summary 添加关键词
 *
 * @param request AddKeywordsToLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddKeywordsToLibResponse
 */
async function addKeywordsToLibWithOptions(request: AddKeywordsToLibRequest, runtime: Util.RuntimeOptions): AddKeywordsToLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.keywords)) {
    body['Keywords'] = request.keywords;
  }
  if (!Util.isUnset(request.keywordsObject)) {
    body['KeywordsObject'] = request.keywordsObject;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'AddKeywordsToLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 添加关键词
 *
 * @param request AddKeywordsToLibRequest
 * @return AddKeywordsToLibResponse
 */
async function addKeywordsToLib(request: AddKeywordsToLibRequest): AddKeywordsToLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return addKeywordsToLibWithOptions(request, runtime);
}

model CancelStockOssCheckTaskRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  taskId?: string(name='TaskId', example='P_UNYVB'),
}

model CancelStockOssCheckTaskResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model CancelStockOssCheckTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CancelStockOssCheckTaskResponseBody(name='body'),
}

/**
 * @summary 取消oss扫描任务
 *
 * @param request CancelStockOssCheckTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CancelStockOssCheckTaskResponse
 */
async function cancelStockOssCheckTaskWithOptions(request: CancelStockOssCheckTaskRequest, runtime: Util.RuntimeOptions): CancelStockOssCheckTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CancelStockOssCheckTask',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 取消oss扫描任务
 *
 * @param request CancelStockOssCheckTaskRequest
 * @return CancelStockOssCheckTaskResponse
 */
async function cancelStockOssCheckTask(request: CancelStockOssCheckTaskRequest): CancelStockOssCheckTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return cancelStockOssCheckTaskWithOptions(request, runtime);
}

model CopyServiceConfigRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  serviceCode?: string(name='ServiceCode', example='nickname_detection'),
  serviceDesc?: string(name='ServiceDesc'),
  serviceName?: string(name='ServiceName'),
}

model CopyServiceConfigResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model CopyServiceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CopyServiceConfigResponseBody(name='body'),
}

/**
 * @summary 复制服务
 *
 * @param request CopyServiceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CopyServiceConfigResponse
 */
async function copyServiceConfigWithOptions(request: CopyServiceConfigRequest, runtime: Util.RuntimeOptions): CopyServiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.serviceDesc)) {
    body['ServiceDesc'] = request.serviceDesc;
  }
  if (!Util.isUnset(request.serviceName)) {
    body['ServiceName'] = request.serviceName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CopyServiceConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 复制服务
 *
 * @param request CopyServiceConfigRequest
 * @return CopyServiceConfigResponse
 */
async function copyServiceConfig(request: CopyServiceConfigRequest): CopyServiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return copyServiceConfigWithOptions(request, runtime);
}

model CreatStockOssCheckTaskRequest {
  buckets?: string(name='Buckets', example='[{\\\\"Bucket\\\\":\\\\"bucket01-test\\\\",\\\\"Region\\\\":\\\\"cn-beijing\\\\"}]'),
  callbackId?: string(name='CallbackId', example='1751'),
  distinctHistoryTasks?: boolean(name='DistinctHistoryTasks', example='true'),
  endTime?: string(name='EndTime', example='2023-12-18 10:08:00'),
  executeDate?: int32(name='ExecuteDate', example='1'),
  executeTime?: string(name='ExecuteTime', example='01:09:30-01:19:30'),
  freeze?: boolean(name='Freeze'),
  freezeHighRisk1?: boolean(name='FreezeHighRisk1'),
  freezeHighRisk2?: boolean(name='FreezeHighRisk2'),
  freezeMediumRisk1?: boolean(name='FreezeMediumRisk1'),
  freezeMediumRisk2?: boolean(name='FreezeMediumRisk2'),
  freezeType?: string(name='FreezeType'),
  isInc?: boolean(name='IsInc', example='false'),
  mediaType?: int32(name='MediaType', example='1'),
  prefixFilterType?: string(name='PrefixFilterType', example='all'),
  prefixFilters?: string(name='PrefixFilters', example='dir1,dir2'),
  priority?: int32(name='Priority', example='0'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  scanLimit?: long(name='ScanLimit', example='10'),
  scanNoFileType?: boolean(name='ScanNoFileType', example='true'),
  scanResourceType?: string(name='ScanResourceType', example='0'),
  scanService?: string(name='ScanService', example='baselineCheck'),
  startTime?: string(name='StartTime', example='2023-12-17 10:08:00'),
  taskCycle?: int32(name='TaskCycle', example='0'),
  taskName?: string(name='TaskName'),
  taskType?: string(name='TaskType', example='batch'),
}

model CreatStockOssCheckTaskResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model CreatStockOssCheckTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatStockOssCheckTaskResponseBody(name='body'),
}

/**
 * @summary 创建oss扫描任务
 *
 * @param request CreatStockOssCheckTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatStockOssCheckTaskResponse
 */
async function creatStockOssCheckTaskWithOptions(request: CreatStockOssCheckTaskRequest, runtime: Util.RuntimeOptions): CreatStockOssCheckTaskResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.buckets)) {
    query['Buckets'] = request.buckets;
  }
  if (!Util.isUnset(request.callbackId)) {
    query['CallbackId'] = request.callbackId;
  }
  if (!Util.isUnset(request.distinctHistoryTasks)) {
    query['DistinctHistoryTasks'] = request.distinctHistoryTasks;
  }
  if (!Util.isUnset(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.executeDate)) {
    query['ExecuteDate'] = request.executeDate;
  }
  if (!Util.isUnset(request.executeTime)) {
    query['ExecuteTime'] = request.executeTime;
  }
  if (!Util.isUnset(request.freeze)) {
    query['Freeze'] = request.freeze;
  }
  if (!Util.isUnset(request.freezeHighRisk1)) {
    query['FreezeHighRisk1'] = request.freezeHighRisk1;
  }
  if (!Util.isUnset(request.freezeHighRisk2)) {
    query['FreezeHighRisk2'] = request.freezeHighRisk2;
  }
  if (!Util.isUnset(request.freezeMediumRisk1)) {
    query['FreezeMediumRisk1'] = request.freezeMediumRisk1;
  }
  if (!Util.isUnset(request.freezeMediumRisk2)) {
    query['FreezeMediumRisk2'] = request.freezeMediumRisk2;
  }
  if (!Util.isUnset(request.freezeType)) {
    query['FreezeType'] = request.freezeType;
  }
  if (!Util.isUnset(request.isInc)) {
    query['IsInc'] = request.isInc;
  }
  if (!Util.isUnset(request.mediaType)) {
    query['MediaType'] = request.mediaType;
  }
  if (!Util.isUnset(request.prefixFilterType)) {
    query['PrefixFilterType'] = request.prefixFilterType;
  }
  if (!Util.isUnset(request.prefixFilters)) {
    query['PrefixFilters'] = request.prefixFilters;
  }
  if (!Util.isUnset(request.priority)) {
    query['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.scanLimit)) {
    query['ScanLimit'] = request.scanLimit;
  }
  if (!Util.isUnset(request.scanNoFileType)) {
    query['ScanNoFileType'] = request.scanNoFileType;
  }
  if (!Util.isUnset(request.scanResourceType)) {
    query['ScanResourceType'] = request.scanResourceType;
  }
  if (!Util.isUnset(request.scanService)) {
    query['ScanService'] = request.scanService;
  }
  if (!Util.isUnset(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.taskCycle)) {
    query['TaskCycle'] = request.taskCycle;
  }
  if (!Util.isUnset(request.taskName)) {
    query['TaskName'] = request.taskName;
  }
  if (!Util.isUnset(request.taskType)) {
    query['TaskType'] = request.taskType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'CreatStockOssCheckTask',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建oss扫描任务
 *
 * @param request CreatStockOssCheckTaskRequest
 * @return CreatStockOssCheckTaskResponse
 */
async function creatStockOssCheckTask(request: CreatStockOssCheckTaskRequest): CreatStockOssCheckTaskResponse {
  var runtime = new Util.RuntimeOptions{};
  return creatStockOssCheckTaskWithOptions(request, runtime);
}

model CreateAnswerLibRequest {
  libName?: string(name='LibName'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sampleBucket?: string(name='SampleBucket', example='oss-cip-shanghai'),
  sampleObject?: string(name='SampleObject', example='data/xxx.xlsx'),
  samples?: string(name='Samples'),
}

model CreateAnswerLibResponseBody = {
  libId?: string(name='LibId', example='alxxxx'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  result?: {
    i18nKey?: string(name='I18nKey', example='xxx'),
    illegalLengthSamples?: [ string ](name='IllegalLengthSamples'),
    invalidCount?: int32(name='InvalidCount', example='1'),
    libId?: string(name='LibId', example='alxxxx'),
    progress?: int32(name='Progress', example='100'),
    repeatCount?: int32(name='RepeatCount', example='1'),
    repeatSamples?: [ string ](name='RepeatSamples'),
    successCount?: int32(name='SuccessCount', example='8'),
    taskId?: string(name='TaskId', example='alAaaaxxx-xxx'),
    totalCount?: int32(name='TotalCount', example='10'),
  }(name='Result'),
  taskId?: string(name='TaskId', example='alAxbbxxxx-xxx'),
}

model CreateAnswerLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateAnswerLibResponseBody(name='body'),
}

/**
 * @summary 创建代答库
 *
 * @param request CreateAnswerLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateAnswerLibResponse
 */
async function createAnswerLibWithOptions(request: CreateAnswerLibRequest, runtime: Util.RuntimeOptions): CreateAnswerLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.libName)) {
    body['LibName'] = request.libName;
  }
  if (!Util.isUnset(request.sampleBucket)) {
    body['SampleBucket'] = request.sampleBucket;
  }
  if (!Util.isUnset(request.sampleObject)) {
    body['SampleObject'] = request.sampleObject;
  }
  if (!Util.isUnset(request.samples)) {
    body['Samples'] = request.samples;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateAnswerLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建代答库
 *
 * @param request CreateAnswerLibRequest
 * @return CreateAnswerLibResponse
 */
async function createAnswerLib(request: CreateAnswerLibRequest): CreateAnswerLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return createAnswerLibWithOptions(request, runtime);
}

model CreateCallbackRequest {
  cryptType?: string(name='CryptType', example='SHA256'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  scope?: string(name='Scope', example='all'),
  url?: string(name='Url', example='https://console.aliyun.com'),
}

model CreateCallbackResponseBody = {
  data?: long(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model CreateCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateCallbackResponseBody(name='body'),
}

/**
 * @summary 新建消息通知
 *
 * @param request CreateCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateCallbackResponse
 */
async function createCallbackWithOptions(request: CreateCallbackRequest, runtime: Util.RuntimeOptions): CreateCallbackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.cryptType)) {
    body['CryptType'] = request.cryptType;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.scope)) {
    body['Scope'] = request.scope;
  }
  if (!Util.isUnset(request.url)) {
    body['Url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreateCallback',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 新建消息通知
 *
 * @param request CreateCallbackRequest
 * @return CreateCallbackResponse
 */
async function createCallback(request: CreateCallbackRequest): CreateCallbackResponse {
  var runtime = new Util.RuntimeOptions{};
  return createCallbackWithOptions(request, runtime);
}

model CreatePreCheckRequest {
  buckets?: string(name='Buckets', example='[{\\\\"Bucket\\\\":\\\\"bucket01-test\\\\",\\\\"Region\\\\":\\\\"cn-beijing\\\\"}]'),
  distinctHistoryTasks?: boolean(name='DistinctHistoryTasks', example='true'),
  endTime?: string(name='EndTime', example='2023-12-18 10:08:00'),
  isInc?: boolean(name='IsInc', example='false'),
  mediaType?: int32(name='MediaType', example='1'),
  prefixFilterType?: string(name='PrefixFilterType', example='all'),
  prefixFilters?: string(name='PrefixFilters', example='dir1,dir2'),
  priority?: int32(name='Priority', example='0'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  scanLimit?: long(name='ScanLimit', example='10'),
  scanNoFileType?: boolean(name='ScanNoFileType', example='true'),
  scanService?: string(name='ScanService', example='baselineCheck'),
  startTime?: string(name='StartTime', example='2023-12-17 10:08:00'),
  taskName?: string(name='TaskName'),
}

model CreatePreCheckResponseBody = {
  data?: map[string]boolean(name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model CreatePreCheckResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePreCheckResponseBody(name='body'),
}

/**
 * @summary 创建oss扫描任务前检查
 *
 * @param request CreatePreCheckRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePreCheckResponse
 */
async function createPreCheckWithOptions(request: CreatePreCheckRequest, runtime: Util.RuntimeOptions): CreatePreCheckResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.buckets)) {
    body['Buckets'] = request.buckets;
  }
  if (!Util.isUnset(request.distinctHistoryTasks)) {
    body['DistinctHistoryTasks'] = request.distinctHistoryTasks;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.isInc)) {
    body['IsInc'] = request.isInc;
  }
  if (!Util.isUnset(request.mediaType)) {
    body['MediaType'] = request.mediaType;
  }
  if (!Util.isUnset(request.prefixFilterType)) {
    body['PrefixFilterType'] = request.prefixFilterType;
  }
  if (!Util.isUnset(request.prefixFilters)) {
    body['PrefixFilters'] = request.prefixFilters;
  }
  if (!Util.isUnset(request.priority)) {
    body['Priority'] = request.priority;
  }
  if (!Util.isUnset(request.scanLimit)) {
    body['ScanLimit'] = request.scanLimit;
  }
  if (!Util.isUnset(request.scanNoFileType)) {
    body['ScanNoFileType'] = request.scanNoFileType;
  }
  if (!Util.isUnset(request.scanService)) {
    body['ScanService'] = request.scanService;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  if (!Util.isUnset(request.taskName)) {
    body['TaskName'] = request.taskName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'CreatePreCheck',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 创建oss扫描任务前检查
 *
 * @param request CreatePreCheckRequest
 * @return CreatePreCheckResponse
 */
async function createPreCheck(request: CreatePreCheckRequest): CreatePreCheckResponse {
  var runtime = new Util.RuntimeOptions{};
  return createPreCheckWithOptions(request, runtime);
}

model DeleteAnswerLibRequest {
  libId?: string(name='LibId', example='alxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model DeleteAnswerLibResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model DeleteAnswerLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAnswerLibResponseBody(name='body'),
}

/**
 * @summary 删除代答库
 *
 * @param request DeleteAnswerLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAnswerLibResponse
 */
async function deleteAnswerLibWithOptions(request: DeleteAnswerLibRequest, runtime: Util.RuntimeOptions): DeleteAnswerLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.libId)) {
    query['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAnswerLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除代答库
 *
 * @param request DeleteAnswerLibRequest
 * @return DeleteAnswerLibResponse
 */
async function deleteAnswerLib(request: DeleteAnswerLibRequest): DeleteAnswerLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAnswerLibWithOptions(request, runtime);
}

model DeleteAnswerSampleRequest {
  ids?: string(name='Ids', example='[15463605]'),
  libId?: string(name='LibId', example='alxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model DeleteAnswerSampleResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model DeleteAnswerSampleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteAnswerSampleResponseBody(name='body'),
}

/**
 * @summary 删除代答答案
 *
 * @param request DeleteAnswerSampleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteAnswerSampleResponse
 */
async function deleteAnswerSampleWithOptions(request: DeleteAnswerSampleRequest, runtime: Util.RuntimeOptions): DeleteAnswerSampleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.ids)) {
    body['Ids'] = request.ids;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteAnswerSample',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除代答答案
 *
 * @param request DeleteAnswerSampleRequest
 * @return DeleteAnswerSampleResponse
 */
async function deleteAnswerSample(request: DeleteAnswerSampleRequest): DeleteAnswerSampleResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteAnswerSampleWithOptions(request, runtime);
}

model DeleteCallbackRequest {
  id?: long(name='Id', description='This parameter is required.', example='1480'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model DeleteCallbackResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model DeleteCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteCallbackResponseBody(name='body'),
}

/**
 * @summary 删除消息通知
 *
 * @param request DeleteCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteCallbackResponse
 */
async function deleteCallbackWithOptions(request: DeleteCallbackRequest, runtime: Util.RuntimeOptions): DeleteCallbackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteCallback',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除消息通知
 *
 * @param request DeleteCallbackRequest
 * @return DeleteCallbackResponse
 */
async function deleteCallback(request: DeleteCallbackRequest): DeleteCallbackResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteCallbackWithOptions(request, runtime);
}

model DeleteFeatureConfigRequest {
  field?: string(name='Field', description='Label value, customer-defined', example='__config__'),
  regionId?: string(name='RegionId', description='Region', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', description='Resource type.', example='text'),
  serviceCode?: string(name='ServiceCode', description='Service code.', example='llm_query_moderation'),
  type?: string(name='Type', description='Type', example='custom_llm_template'),
}

model DeleteFeatureConfigResponseBody = {
  code?: int32(name='Code', description='Status code.', example='200'),
  data?: boolean(name='Data', description='Return result.', example='True'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  msg?: string(name='Msg', description='Response message of this request.', example='success'),
  requestId?: string(name='RequestId', description='ID assigned by the backend, used to uniquely identify a request. Can be used for troubleshooting.', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', description='Success indicator.', example='True'),
}

model DeleteFeatureConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteFeatureConfigResponseBody(name='body'),
}

/**
 * @summary Delete feature configuration
 *
 * @param request DeleteFeatureConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteFeatureConfigResponse
 */
async function deleteFeatureConfigWithOptions(request: DeleteFeatureConfigRequest, runtime: Util.RuntimeOptions): DeleteFeatureConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.field)) {
    body['Field'] = request.field;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteFeatureConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Delete feature configuration
 *
 * @param request DeleteFeatureConfigRequest
 * @return DeleteFeatureConfigResponse
 */
async function deleteFeatureConfig(request: DeleteFeatureConfigRequest): DeleteFeatureConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteFeatureConfigWithOptions(request, runtime);
}

model DeleteImagesFromLibRequest {
  imageIds?: string(name='ImageIds', example='[158794]'),
  libId?: string(name='LibId', example='customxx_xxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model DeleteImagesFromLibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model DeleteImagesFromLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteImagesFromLibResponseBody(name='body'),
}

/**
 * @summary 批量删除
 *
 * @param request DeleteImagesFromLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteImagesFromLibResponse
 */
async function deleteImagesFromLibWithOptions(request: DeleteImagesFromLibRequest, runtime: Util.RuntimeOptions): DeleteImagesFromLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.imageIds)) {
    body['ImageIds'] = request.imageIds;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteImagesFromLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 批量删除
 *
 * @param request DeleteImagesFromLibRequest
 * @return DeleteImagesFromLibResponse
 */
async function deleteImagesFromLib(request: DeleteImagesFromLibRequest): DeleteImagesFromLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteImagesFromLibWithOptions(request, runtime);
}

model DeleteKeywordRequest {
  keywordIdList?: string(name='KeywordIdList'),
  keywordIds?: string(name='KeywordIds', example='[16754493]'),
  libId?: string(name='LibId', example='customxx_xxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model DeleteKeywordResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model DeleteKeywordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteKeywordResponseBody(name='body'),
}

/**
 * @summary 删除关键词
 *
 * @param request DeleteKeywordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteKeywordResponse
 */
async function deleteKeywordWithOptions(request: DeleteKeywordRequest, runtime: Util.RuntimeOptions): DeleteKeywordResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.keywordIdList)) {
    body['KeywordIdList'] = request.keywordIdList;
  }
  if (!Util.isUnset(request.keywordIds)) {
    body['KeywordIds'] = request.keywordIds;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteKeyword',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除关键词
 *
 * @param request DeleteKeywordRequest
 * @return DeleteKeywordResponse
 */
async function deleteKeyword(request: DeleteKeywordRequest): DeleteKeywordResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteKeywordWithOptions(request, runtime);
}

model DeleteKeywordLibRequest {
  libId?: string(name='LibId', example='customxx_xxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model DeleteKeywordLibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model DeleteKeywordLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteKeywordLibResponseBody(name='body'),
}

/**
 * @summary 删除关键词库
 *
 * @param request DeleteKeywordLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteKeywordLibResponse
 */
async function deleteKeywordLibWithOptions(request: DeleteKeywordLibRequest, runtime: Util.RuntimeOptions): DeleteKeywordLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'DeleteKeywordLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 删除关键词库
 *
 * @param request DeleteKeywordLibRequest
 * @return DeleteKeywordLibResponse
 */
async function deleteKeywordLib(request: DeleteKeywordLibRequest): DeleteKeywordLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return deleteKeywordLibWithOptions(request, runtime);
}

model ExportAnswerSampleRequest {
  libId?: string(name='LibId', example='alxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model ExportAnswerSampleResponseBody = {
  data?: string(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model ExportAnswerSampleResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportAnswerSampleResponseBody(name='body'),
}

/**
 * @summary 导出代答答案
 *
 * @param request ExportAnswerSampleRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportAnswerSampleResponse
 */
async function exportAnswerSampleWithOptions(request: ExportAnswerSampleRequest, runtime: Util.RuntimeOptions): ExportAnswerSampleResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ExportAnswerSample',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出代答答案
 *
 * @param request ExportAnswerSampleRequest
 * @return ExportAnswerSampleResponse
 */
async function exportAnswerSample(request: ExportAnswerSampleRequest): ExportAnswerSampleResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportAnswerSampleWithOptions(request, runtime);
}

model ExportCipStatsRequest {
  byMonth?: boolean(name='ByMonth', example='true'),
  endDate?: string(name='EndDate', example='2024-04-16 09:00:00'),
  exportType?: string(name='ExportType'),
  label?: string(name='Label', example='xx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  serviceCode?: string(name='ServiceCode'),
  startDate?: string(name='StartDate', example='2024-04-15 09:00:00'),
  subUid?: string(name='SubUid', example='268220485413130979'),
  type?: string(name='Type'),
}

model ExportCipStatsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/portal_data/production/cipStat/text/statistics1720597246783.xlsx'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ExportCipStatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportCipStatsResponseBody(name='body'),
}

/**
 * @summary 导出调用量
 *
 * @param request ExportCipStatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportCipStatsResponse
 */
async function exportCipStatsWithOptions(request: ExportCipStatsRequest, runtime: Util.RuntimeOptions): ExportCipStatsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.byMonth)) {
    body['ByMonth'] = request.byMonth;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.exportType)) {
    body['ExportType'] = request.exportType;
  }
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.subUid)) {
    body['SubUid'] = request.subUid;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ExportCipStats',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出调用量
 *
 * @param request ExportCipStatsRequest
 * @return ExportCipStatsResponse
 */
async function exportCipStats(request: ExportCipStatsRequest): ExportCipStatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportCipStatsWithOptions(request, runtime);
}

model ExportKeywordRequest {
  libId?: string(name='LibId', example='customxx_xxxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model ExportKeywordResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/console_data/export/production/keyword/export_keywordO4ee1Bok1R8IIDVpcT9viU-1xxWr'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ExportKeywordResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportKeywordResponseBody(name='body'),
}

/**
 * @summary 导出关键词
 *
 * @param request ExportKeywordRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportKeywordResponse
 */
async function exportKeywordWithOptions(request: ExportKeywordRequest, runtime: Util.RuntimeOptions): ExportKeywordResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ExportKeyword',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出关键词
 *
 * @param request ExportKeywordRequest
 * @return ExportKeywordResponse
 */
async function exportKeyword(request: ExportKeywordRequest): ExportKeywordResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportKeywordWithOptions(request, runtime);
}

model ExportOssCheckStatRequest {
  byMonth?: boolean(name='ByMonth', example='true'),
  endDate?: string(name='EndDate', example='2024-03-11 10:00:00'),
  parentTaskId?: string(name='ParentTaskId', example='P_UX0K5X'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  startDate?: string(name='StartDate', example='2024-03-10 10:00:00'),
}

model ExportOssCheckStatResponseBody = {
  data?: string(name='Data', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/console_data/production/scanResult/osscheck/ossCheckStat_aliUf5B3lJfOkLpqozLIn94Uy-1XxKyX.xlsx'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model ExportOssCheckStatResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportOssCheckStatResponseBody(name='body'),
}

/**
 * @summary oss用量统计导出
 *
 * @param request ExportOssCheckStatRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportOssCheckStatResponse
 */
async function exportOssCheckStatWithOptions(request: ExportOssCheckStatRequest, runtime: Util.RuntimeOptions): ExportOssCheckStatResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.byMonth)) {
    body['ByMonth'] = request.byMonth;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.parentTaskId)) {
    body['ParentTaskId'] = request.parentTaskId;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ExportOssCheckStat',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary oss用量统计导出
 *
 * @param request ExportOssCheckStatRequest
 * @return ExportOssCheckStatResponse
 */
async function exportOssCheckStat(request: ExportOssCheckStatRequest): ExportOssCheckStatResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportOssCheckStatWithOptions(request, runtime);
}

model ExportResultRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  pageSize?: int32(name='PageSize', example='20'),
  query?: string(name='Query', example='{"TaskId":"P_11TL5T"}'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model ExportResultShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  pageSize?: int32(name='PageSize', example='20'),
  query?: string(name='Query', example='{"TaskId":"P_11TL5T"}'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model ExportResultResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/console_data/production/scanResult/osscheck/ossCheckResult_aliiGGXhSMvmIvsS7Lrl3LaUZ-1A9%24oZ.xlsx'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ExportResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportResultResponseBody(name='body'),
}

/**
 * @summary 导出oss扫描结果
 *
 * @param tmpReq ExportResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportResultResponse
 */
async function exportResultWithOptions(tmpReq: ExportResultRequest, runtime: Util.RuntimeOptions): ExportResultResponse {
  Util.validateModel(tmpReq);
  var request = new ExportResultShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.query)) {
    body['Query'] = request.query;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ExportResult',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出oss扫描结果
 *
 * @param request ExportResultRequest
 * @return ExportResultResponse
 */
async function exportResult(request: ExportResultRequest): ExportResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportResultWithOptions(request, runtime);
}

model ExportScanResultRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2024-03-11 10:00:00'),
  pageSize?: int32(name='PageSize', example='20'),
  query?: map[string]string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  sort?: map[string]string(name='Sort'),
  startDate?: string(name='StartDate', example='2024-03-10 10:00:00'),
}

model ExportScanResultShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2024-03-11 10:00:00'),
  pageSize?: int32(name='PageSize', example='20'),
  queryShrink?: string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  sortShrink?: string(name='Sort'),
  startDate?: string(name='StartDate', example='2024-03-10 10:00:00'),
}

model ExportScanResultResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/portal_data/production/scanResult/text/textScanResult_aliow2MAdWXCakCxlitVY8Lnn-1A9KEw.xlsx'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ExportScanResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportScanResultResponseBody(name='body'),
}

/**
 * @summary 导出调用结果，excel文件
 *
 * @param tmpReq ExportScanResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportScanResultResponse
 */
async function exportScanResultWithOptions(tmpReq: ExportScanResultRequest, runtime: Util.RuntimeOptions): ExportScanResultResponse {
  Util.validateModel(tmpReq);
  var request = new ExportScanResultShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.query)) {
    request.queryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.query, 'Query', 'json');
  }
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryShrink)) {
    body['Query'] = request.queryShrink;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ExportScanResult',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出调用结果，excel文件
 *
 * @param request ExportScanResultRequest
 * @return ExportScanResultResponse
 */
async function exportScanResult(request: ExportScanResultRequest): ExportScanResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportScanResultWithOptions(request, runtime);
}

model ExportTextScanResultRequest {
  endDate?: string(name='EndDate', example='2024-03-11 10:00:00'),
  query?: map[string]string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  startDate?: string(name='StartDate', example='2024-03-10 10:00:00'),
}

model ExportTextScanResultShrinkRequest {
  endDate?: string(name='EndDate', example='2024-03-11 10:00:00'),
  queryShrink?: string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  startDate?: string(name='StartDate', example='2024-03-10 10:00:00'),
}

model ExportTextScanResultResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: string(name='Data', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/portal_data/production/scanResult/text/textScanResult_aliow2MAdWXCakCxlitVY8Lnn-1A9KEw.xlsx'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ExportTextScanResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ExportTextScanResultResponseBody(name='body'),
}

/**
 * @summary 导出调用结果，excel文件
 *
 * @param tmpReq ExportTextScanResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ExportTextScanResultResponse
 */
async function exportTextScanResultWithOptions(tmpReq: ExportTextScanResultRequest, runtime: Util.RuntimeOptions): ExportTextScanResultResponse {
  Util.validateModel(tmpReq);
  var request = new ExportTextScanResultShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.query)) {
    request.queryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.query, 'Query', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.queryShrink)) {
    body['Query'] = request.queryShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ExportTextScanResult',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 导出调用结果，excel文件
 *
 * @param request ExportTextScanResultRequest
 * @return ExportTextScanResultResponse
 */
async function exportTextScanResult(request: ExportTextScanResultRequest): ExportTextScanResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return exportTextScanResultWithOptions(request, runtime);
}

model GetAnswerImportProgressRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  taskId?: string(name='TaskId', example='alAxbbxxxx-xxx'),
}

model GetAnswerImportProgressResponseBody = {
  i18nKey?: string(name='I18nKey', example='xxx'),
  illegalLengthSamples?: [ string ](name='IllegalLengthSamples'),
  invalidCount?: int32(name='InvalidCount', example='1'),
  libId?: string(name='LibId', example='alxxxx'),
  progress?: int32(name='Progress', example='100'),
  repeatCount?: int32(name='RepeatCount', example='1'),
  repeatSamples?: [ string ](name='RepeatSamples'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  successCount?: int32(name='SuccessCount', example='8'),
  taskId?: string(name='TaskId', example='alAxbbxxxx-xxx'),
  tips?: string(name='Tips', example='xxxxx'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model GetAnswerImportProgressResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetAnswerImportProgressResponseBody(name='body'),
}

/**
 * @summary 获取代答样本导入进度
 *
 * @param request GetAnswerImportProgressRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetAnswerImportProgressResponse
 */
async function getAnswerImportProgressWithOptions(request: GetAnswerImportProgressRequest, runtime: Util.RuntimeOptions): GetAnswerImportProgressResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetAnswerImportProgress',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取代答样本导入进度
 *
 * @param request GetAnswerImportProgressRequest
 * @return GetAnswerImportProgressResponse
 */
async function getAnswerImportProgress(request: GetAnswerImportProgressRequest): GetAnswerImportProgressResponse {
  var runtime = new Util.RuntimeOptions{};
  return getAnswerImportProgressWithOptions(request, runtime);
}

model GetBackupBucketsListRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetBackupBucketsListResponseBody = {
  data?: [ 
    {
      bucket?: string(name='Bucket', example='gj-bucket1'),
      region?: string(name='Region', example='cn-shanghai'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetBackupBucketsListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBackupBucketsListResponseBody(name='body'),
}

/**
 * @summary 证据转存获取用户bucket列表
 *
 * @param request GetBackupBucketsListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBackupBucketsListResponse
 */
async function getBackupBucketsListWithOptions(request: GetBackupBucketsListRequest, runtime: Util.RuntimeOptions): GetBackupBucketsListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBackupBucketsList',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 证据转存获取用户bucket列表
 *
 * @param request GetBackupBucketsListRequest
 * @return GetBackupBucketsListResponse
 */
async function getBackupBucketsList(request: GetBackupBucketsListRequest): GetBackupBucketsListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBackupBucketsListWithOptions(request, runtime);
}

model GetBackupConfigRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='image'),
  serviceCode?: string(name='ServiceCode', example='baselineCheck'),
}

model GetBackupConfigResponseBody = {
  backupMode?: int32(name='BackupMode', example='0'),
  bucket?: string(name='Bucket', example='buckect_test'),
  enable?: boolean(name='Enable', example='true'),
  enableBackup?: boolean(name='EnableBackup'),
  enableBackupVoice?: boolean(name='EnableBackupVoice'),
  expireSeconds?: int32(name='ExpireSeconds', example='300'),
  gmtModified?: string(name='GmtModified', example='2023-01-17 12:29:56'),
  path?: string(name='Path', example='aliyun/template/'),
  pathVoice?: string(name='PathVoice'),
  region?: string(name='Region', example='cn-hangzhou'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  resourceType?: string(name='ResourceType', example='image'),
  serviceCode?: string(name='ServiceCode', example='baselineCheck'),
  uid?: string(name='Uid', description='UID。', example='1772612608370735'),
}

model GetBackupConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBackupConfigResponseBody(name='body'),
}

/**
 * @summary 获取证据转存配置
 *
 * @param request GetBackupConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBackupConfigResponse
 */
async function getBackupConfigWithOptions(request: GetBackupConfigRequest, runtime: Util.RuntimeOptions): GetBackupConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBackupConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取证据转存配置
 *
 * @param request GetBackupConfigRequest
 * @return GetBackupConfigResponse
 */
async function getBackupConfig(request: GetBackupConfigRequest): GetBackupConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBackupConfigWithOptions(request, runtime);
}

model GetBackupStatusRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetBackupStatusResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetBackupStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBackupStatusResponseBody(name='body'),
}

/**
 * @summary 用户授权校验
 *
 * @param request GetBackupStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBackupStatusResponse
 */
async function getBackupStatusWithOptions(request: GetBackupStatusRequest, runtime: Util.RuntimeOptions): GetBackupStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBackupStatus',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 用户授权校验
 *
 * @param request GetBackupStatusRequest
 * @return GetBackupStatusResponse
 */
async function getBackupStatus(request: GetBackupStatusRequest): GetBackupStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBackupStatusWithOptions(request, runtime);
}

model GetBucketsListRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetBucketsListResponseBody = {
  data?: [ 
    {
      bucket?: string(name='Bucket', example='bucket_test'),
      region?: string(name='Region', example='cn-hangzhou'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetBucketsListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetBucketsListResponseBody(name='body'),
}

/**
 * @summary bucket列表
 *
 * @param request GetBucketsListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetBucketsListResponse
 */
async function getBucketsListWithOptions(request: GetBucketsListRequest, runtime: Util.RuntimeOptions): GetBucketsListResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetBucketsList',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary bucket列表
 *
 * @param request GetBucketsListRequest
 * @return GetBucketsListResponse
 */
async function getBucketsList(request: GetBucketsListRequest): GetBucketsListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getBucketsListWithOptions(request, runtime);
}

model GetCipStatsRequest {
  byMonth?: boolean(name='ByMonth', example='true'),
  endDate?: string(name='EndDate', example='2024-03-11 10:00:00'),
  label?: string(name='Label', example='xx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  serviceCode?: string(name='ServiceCode'),
  startDate?: string(name='StartDate', example='2024-03-10 10:00:00'),
  subUid?: string(name='SubUid', example='253552244990701265'),
  type?: string(name='Type'),
}

model GetCipStatsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    labelStatChart?: [ 
      {
        imageTreeChar?: [ 
          {
            description?: string(name='Description'),
            name?: string(name='Name'),
            value?: string(name='Value'),
          }
        ](name='ImageTreeChar'),
        serviceCode?: string(name='ServiceCode', example='nickNameDetection'),
        textTreeChart?: [ 
          {
            description?: string(name='Description'),
            name?: string(name='Name'),
            value?: string(name='Value'),
          }
        ](name='TextTreeChart'),
        totalCount?: long(name='TotalCount', example='117'),
        treeChart?: [ 
          {
            description?: string(name='Description'),
            name?: string(name='Name', example='nickNameDetection'),
            value?: string(name='Value', example='99.91'),
          }
        ](name='TreeChart'),
        voiceTreeChart?: [ 
          {
            description?: string(name='Description'),
            name?: string(name='Name', example='nickNameDetection'),
            value?: string(name='Value', example='99.91'),
          }
        ](name='VoiceTreeChart'),
        x?: [ string ](name='X'),
        y?: [ 
          {
            data?: [ long ](name='Data'),
            name?: string(name='Name', example='nickNameDetection'),
          }
        ](name='Y'),
      }
    ](name='LabelStatChart'),
    totalStat?: map[string]object(name='TotalStat'),
    uids?: [ string ](name='Uids'),
    x?: [ string ](name='X'),
    y?: [ 
      {
        data?: [ long ](name='Data'),
        name?: string(name='Name', example='nickNameDetection'),
      }
    ](name='Y'),
    z?: [ 
      {
        data?: [ long ](name='Data'),
        name?: string(name='Name', example='nickNameDetection'),
      }
    ](name='Z'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetCipStatsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetCipStatsResponseBody(name='body'),
}

/**
 * @summary 查询调用量
 *
 * @param request GetCipStatsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetCipStatsResponse
 */
async function getCipStatsWithOptions(request: GetCipStatsRequest, runtime: Util.RuntimeOptions): GetCipStatsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.type)) {
    query['Type'] = request.type;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.byMonth)) {
    body['ByMonth'] = request.byMonth;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.label)) {
    body['Label'] = request.label;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.subUid)) {
    body['SubUid'] = request.subUid;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetCipStats',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询调用量
 *
 * @param request GetCipStatsRequest
 * @return GetCipStatsResponse
 */
async function getCipStats(request: GetCipStatsRequest): GetCipStatsResponse {
  var runtime = new Util.RuntimeOptions{};
  return getCipStatsWithOptions(request, runtime);
}

model GetExecuteTimeRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetExecuteTimeResponseBody = {
  data?: string(name='Data', example='02:24:30'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetExecuteTimeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetExecuteTimeResponseBody(name='body'),
}

/**
 * @summary 获取定时任务预计执行时间
 *
 * @param request GetExecuteTimeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetExecuteTimeResponse
 */
async function getExecuteTimeWithOptions(request: GetExecuteTimeRequest, runtime: Util.RuntimeOptions): GetExecuteTimeResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetExecuteTime',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取定时任务预计执行时间
 *
 * @param request GetExecuteTimeRequest
 * @return GetExecuteTimeResponse
 */
async function getExecuteTime(request: GetExecuteTimeRequest): GetExecuteTimeResponse {
  var runtime = new Util.RuntimeOptions{};
  return getExecuteTimeWithOptions(request, runtime);
}

model GetFeatureConfigRequest {
  regionId?: string(name='RegionId', description='Region ID', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', description='Resource type.', example='text'),
  serviceCode?: string(name='ServiceCode', description='Service code.', example='llm_query_moderation'),
  type?: string(name='Type', description='Type', example='custom_llm_template'),
}

model GetFeatureConfigResponseBody = {
  code?: int32(name='Code', description='Status code', example='200'),
  data?: {
    featureConf?: [  map[string]any ](name='FeatureConf', description='List of feature configurations'),
    resourceType?: string(name='ResourceType', description='Resource type.', example='text'),
    serviceCode?: string(name='ServiceCode', description='Service code.', example='llm_query_moderation'),
    type?: string(name='Type', description='Type', example='custom_llm_template'),
    uid?: string(name='Uid', description='UID.', example='1643953****74290'),
  }(name='Data', description='Returned data.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  msg?: string(name='Msg', description='Response message for this request.', example='success'),
  requestId?: string(name='RequestId', description='ID assigned by the backend, used to uniquely identify a request. Can be used for troubleshooting.', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', description='Success indicator', example='true'),
}

model GetFeatureConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetFeatureConfigResponseBody(name='body'),
}

/**
 * @summary Get Feature Configuration
 *
 * @param request GetFeatureConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetFeatureConfigResponse
 */
async function getFeatureConfigWithOptions(request: GetFeatureConfigRequest, runtime: Util.RuntimeOptions): GetFeatureConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetFeatureConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Get Feature Configuration
 *
 * @param request GetFeatureConfigRequest
 * @return GetFeatureConfigResponse
 */
async function getFeatureConfig(request: GetFeatureConfigRequest): GetFeatureConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getFeatureConfigWithOptions(request, runtime);
}

model GetImageSceneLabelConfRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetImageSceneLabelConfResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: [  map[string]any ](name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetImageSceneLabelConfResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetImageSceneLabelConfResponseBody(name='body'),
}

/**
 * @summary 获取图片规则标签信息
 *
 * @param request GetImageSceneLabelConfRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetImageSceneLabelConfResponse
 */
async function getImageSceneLabelConfWithOptions(request: GetImageSceneLabelConfRequest, runtime: Util.RuntimeOptions): GetImageSceneLabelConfResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetImageSceneLabelConf',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取图片规则标签信息
 *
 * @param request GetImageSceneLabelConfRequest
 * @return GetImageSceneLabelConfResponse
 */
async function getImageSceneLabelConf(request: GetImageSceneLabelConfRequest): GetImageSceneLabelConfResponse {
  var runtime = new Util.RuntimeOptions{};
  return getImageSceneLabelConfWithOptions(request, runtime);
}

model GetImageSceneLabelListConfRequest {
  imageServiceCode?: string(name='ImageServiceCode', example='baselineCheck'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetImageSceneLabelListConfResponseBody = {
  data?: [ any ](name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetImageSceneLabelListConfResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetImageSceneLabelListConfResponseBody(name='body'),
}

/**
 * @summary 获取图片规则标签信息
 *
 * @param request GetImageSceneLabelListConfRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetImageSceneLabelListConfResponse
 */
async function getImageSceneLabelListConfWithOptions(request: GetImageSceneLabelListConfRequest, runtime: Util.RuntimeOptions): GetImageSceneLabelListConfResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.imageServiceCode)) {
    query['ImageServiceCode'] = request.imageServiceCode;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetImageSceneLabelListConf',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取图片规则标签信息
 *
 * @param request GetImageSceneLabelListConfRequest
 * @return GetImageSceneLabelListConfResponse
 */
async function getImageSceneLabelListConf(request: GetImageSceneLabelListConfRequest): GetImageSceneLabelListConfResponse {
  var runtime = new Util.RuntimeOptions{};
  return getImageSceneLabelListConfWithOptions(request, runtime);
}

model GetJobNameListRequest {
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  query?: string(name='Query', example='{"TaskId":"P_11TL5T"}'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model GetJobNameListShrinkRequest {
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  query?: string(name='Query', example='{"TaskId":"P_11TL5T"}'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model GetJobNameListResponseBody = {
  data?: [ string ](name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetJobNameListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetJobNameListResponseBody(name='body'),
}

/**
 * @summary oss定时扫描检测周期查询
 *
 * @param tmpReq GetJobNameListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetJobNameListResponse
 */
async function getJobNameListWithOptions(tmpReq: GetJobNameListRequest, runtime: Util.RuntimeOptions): GetJobNameListResponse {
  Util.validateModel(tmpReq);
  var request = new GetJobNameListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.query)) {
    query['Query'] = request.query;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.sortShrink)) {
    query['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetJobNameList',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary oss定时扫描检测周期查询
 *
 * @param request GetJobNameListRequest
 * @return GetJobNameListResponse
 */
async function getJobNameList(request: GetJobNameListRequest): GetJobNameListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getJobNameListWithOptions(request, runtime);
}

model GetKeywordImportResultRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  taskId?: string(name='TaskId', example='xxx-xxx'),
}

model GetKeywordImportResultResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    i18nKey?: string(name='I18nKey', example='xxx'),
    illegalLengthKeywords?: [ string ](name='IllegalLengthKeywords'),
    invalidCount?: int32(name='InvalidCount', example='1'),
    invalidKeywords?: [ string ](name='InvalidKeywords'),
    libId?: string(name='LibId', example='customxx_xxx'),
    progress?: int32(name='Progress', example='100'),
    repeatCount?: int32(name='RepeatCount', example='1'),
    repeatKeywords?: [ string ](name='RepeatKeywords'),
    successCount?: int32(name='SuccessCount', example='8'),
    tips?: string(name='Tips', example='xxx'),
    totalCount?: int32(name='TotalCount', example='10'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetKeywordImportResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetKeywordImportResultResponseBody(name='body'),
}

/**
 * @summary 查询导入关键词结果
 *
 * @param request GetKeywordImportResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetKeywordImportResultResponse
 */
async function getKeywordImportResultWithOptions(request: GetKeywordImportResultRequest, runtime: Util.RuntimeOptions): GetKeywordImportResultResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetKeywordImportResult',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询导入关键词结果
 *
 * @param request GetKeywordImportResultRequest
 * @return GetKeywordImportResultResponse
 */
async function getKeywordImportResult(request: GetKeywordImportResultRequest): GetKeywordImportResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getKeywordImportResultWithOptions(request, runtime);
}

model GetKeywordLibRequest {
  libId?: string(name='LibId', example='customxx_xxx'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetKeywordLibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    gmtModified?: string(name='GmtModified', example='2024-01-29 10:26:00'),
    keywordCount?: string(name='KeywordCount', example='100'),
    libId?: string(name='LibId', example='customxx_xxx'),
    libName?: string(name='LibName'),
    uid?: string(name='Uid', example='1825457112123838'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetKeywordLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetKeywordLibResponseBody(name='body'),
}

/**
 * @summary 关键词库信息
 *
 * @param request GetKeywordLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetKeywordLibResponse
 */
async function getKeywordLibWithOptions(request: GetKeywordLibRequest, runtime: Util.RuntimeOptions): GetKeywordLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetKeywordLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 关键词库信息
 *
 * @param request GetKeywordLibRequest
 * @return GetKeywordLibResponse
 */
async function getKeywordLib(request: GetKeywordLibRequest): GetKeywordLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return getKeywordLibWithOptions(request, runtime);
}

model GetOssCheckStatRequest {
  byMonth?: boolean(name='ByMonth', example='true'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  parentTaskId?: string(name='ParentTaskId', example='P_UNHBH'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model GetOssCheckStatResponseBody = {
  barChart?: {
    x?: [ string ](name='X'),
    y?: [ 
      {
        data?: [ long ](name='Data'),
        name?: string(name='Name', example='document_detection'),
      }
    ](name='Y'),
  }(name='BarChart'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetOssCheckStatResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOssCheckStatResponseBody(name='body'),
}

/**
 * @summary oss用量统计
 *
 * @param request GetOssCheckStatRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOssCheckStatResponse
 */
async function getOssCheckStatWithOptions(request: GetOssCheckStatRequest, runtime: Util.RuntimeOptions): GetOssCheckStatResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.byMonth)) {
    body['ByMonth'] = request.byMonth;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.parentTaskId)) {
    body['ParentTaskId'] = request.parentTaskId;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetOssCheckStat',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary oss用量统计
 *
 * @param request GetOssCheckStatRequest
 * @return GetOssCheckStatResponse
 */
async function getOssCheckStat(request: GetOssCheckStatRequest): GetOssCheckStatResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOssCheckStatWithOptions(request, runtime);
}

model GetOssCheckStatusRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetOssCheckStatusResponseBody = {
  bid?: string(name='Bid', description='Bid。', example='26842'),
  buy?: boolean(name='Buy', example='True'),
  commodityCode?: string(name='CommodityCode', example='xxx'),
  indebt?: boolean(name='Indebt', example='False'),
  ramStatus?: string(name='RamStatus', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  slsStatus?: string(name='SlsStatus', example='True'),
}

model GetOssCheckStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetOssCheckStatusResponseBody(name='body'),
}

/**
 * @summary 获取OSS检测用户状态
 *
 * @param request GetOssCheckStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetOssCheckStatusResponse
 */
async function getOssCheckStatusWithOptions(request: GetOssCheckStatusRequest, runtime: Util.RuntimeOptions): GetOssCheckStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetOssCheckStatus',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取OSS检测用户状态
 *
 * @param request GetOssCheckStatusRequest
 * @return GetOssCheckStatusResponse
 */
async function getOssCheckStatus(request: GetOssCheckStatusRequest): GetOssCheckStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getOssCheckStatusWithOptions(request, runtime);
}

model GetScanNumRequest {
  buckets?: string(name='Buckets', example='tmpsample'),
  mediaType?: int32(name='MediaType', example='image'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetScanNumResponseBody = {
  limitNumber?: long(name='LimitNumber', example='10'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  scanNumber?: long(name='ScanNumber', example='10'),
  sumNumber?: long(name='SumNumber', example='10'),
  tag?: boolean(name='Tag', example='True'),
}

model GetScanNumResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetScanNumResponseBody(name='body'),
}

/**
 * @summary 用户待检测信息
 *
 * @param request GetScanNumRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetScanNumResponse
 */
async function getScanNumWithOptions(request: GetScanNumRequest, runtime: Util.RuntimeOptions): GetScanNumResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.buckets)) {
    query['Buckets'] = request.buckets;
  }
  if (!Util.isUnset(request.mediaType)) {
    query['MediaType'] = request.mediaType;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'GetScanNum',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 用户待检测信息
 *
 * @param request GetScanNumRequest
 * @return GetScanNumResponse
 */
async function getScanNum(request: GetScanNumRequest): GetScanNumResponse {
  var runtime = new Util.RuntimeOptions{};
  return getScanNumWithOptions(request, runtime);
}

model GetScanResultRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  pageSize?: int32(name='PageSize', example='10'),
  query?: map[string]string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='image'),
  sort?: map[string]string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model GetScanResultShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  pageSize?: int32(name='PageSize', example='10'),
  queryShrink?: string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='image'),
  sortShrink?: string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model GetScanResultResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    items?: [ 
      {
        attackLevel?: string(name='AttackLevel'),
        content?: string(name='Content', example='xxx'),
        dataId?: string(name='DataId', description='dataId', example='4f27b8cc7c4544cb90b41882a5b36326'),
        endTime?: string(name='EndTime', example='22'),
        extFeedback?: string(name='ExtFeedback', example='xxx'),
        extra?: map[string]any(name='Extra', example='{}'),
        frameCount?: long(name='FrameCount', example='20'),
        gmtCreate?: string(name='GmtCreate', example='2023-08-11 09:00:19'),
        imageLabels?: [  map[string]any ](name='ImageLabels'),
        imageService?: string(name='ImageService', example='baselineCheck'),
        imageUrl?: string(name='ImageUrl', description='url', example='https://www.aliyuncs.com/xxx.png'),
        labels?: string(name='Labels', example='nonLabel'),
        noLabels?: [ string ](name='NoLabels'),
        offset?: long(name='Offset', example='1'),
        pageNum?: long(name='PageNum', example='1'),
        requestFrom?: string(name='RequestFrom'),
        requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
        requestTime?: string(name='RequestTime', example='2023-08-11 09:00:19'),
        result?: [ 
          {
            confidence?: string(name='Confidence', example='50.0'),
            description?: string(name='Description'),
            label?: string(name='Label', example='politics'),
          }
        ](name='Result'),
        riskLevel?: string(name='RiskLevel'),
        riskTips?: string(name='RiskTips'),
        riskWords?: string(name='RiskWords'),
        scanResult?: string(name='ScanResult', example='{}'),
        score?: float(name='Score', example='25'),
        sensitiveLevel?: string(name='SensitiveLevel'),
        serviceCode?: string(name='ServiceCode', example='baselineCheck'),
        startTime?: string(name='StartTime', example='11'),
        suggestion?: string(name='Suggestion', example='review'),
        taskId?: string(name='TaskId', example='vi_s_EbrXb716LyBpkfwxyX5xyh-1A6RY9'),
        textLabels?: [  map[string]any ](name='TextLabels'),
        thumbnail?: string(name='Thumbnail', example='https://www.aliyuncs.com/xxx.png'),
        timeStamp?: string(name='TimeStamp', example='00:00:40-00:00:42'),
        url?: string(name='Url', example='https://www.aliyuncs.com/xxx.png'),
        voiceLabels?: [  map[string]any ](name='VoiceLabels'),
        voiceScanOpened?: boolean(name='VoiceScanOpened', example='True'),
        voiceService?: string(name='VoiceService', example='live_stream_detection'),
      }
    ](name='Items'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: long(name='TotalCount', example='1'),
  }(name='Data'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetScanResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetScanResultResponseBody(name='body'),
}

/**
 * @summary 查询调用结果
 *
 * @param tmpReq GetScanResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetScanResultResponse
 */
async function getScanResultWithOptions(tmpReq: GetScanResultRequest, runtime: Util.RuntimeOptions): GetScanResultResponse {
  Util.validateModel(tmpReq);
  var request = new GetScanResultShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.query)) {
    request.queryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.query, 'Query', 'json');
  }
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryShrink)) {
    body['Query'] = request.queryShrink;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetScanResult',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询调用结果
 *
 * @param request GetScanResultRequest
 * @return GetScanResultResponse
 */
async function getScanResult(request: GetScanResultRequest): GetScanResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getScanResultWithOptions(request, runtime);
}

model GetServiceConfRequest {
  byDefault?: boolean(name='ByDefault', example='False'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='image'),
  scene?: string(name='Scene', example='pornographic'),
  serviceCode?: string(name='ServiceCode', example='baselineCheck'),
}

model GetServiceConfResponseBody = {
  classify?: string(name='Classify'),
  code?: int32(name='Code', example='200'),
  customServiceConf?: map[string]any(name='CustomServiceConf', example='{}'),
  gmtModified?: string(name='GmtModified', example='2023-01-17 12:29:56'),
  msg?: string(name='Msg', example='OK'),
  option?: map[string]any(name='Option', example='{}'),
  requestId?: string(name='RequestId', example='6CF2815C-****-****-B52E-FF6E2****492'),
  resourceType?: string(name='ResourceType', example='image'),
  serviceCode?: string(name='ServiceCode', example='baselineCheck'),
  success?: boolean(name='Success', example='True'),
  uid?: string(name='Uid', description='UID。', example='17726*****370735'),
}

model GetServiceConfResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceConfResponseBody(name='body'),
}

/**
 * @summary 获取单个服务
 *
 * @param request GetServiceConfRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceConfResponse
 */
async function getServiceConfWithOptions(request: GetServiceConfRequest, runtime: Util.RuntimeOptions): GetServiceConfResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.byDefault)) {
    body['ByDefault'] = request.byDefault;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.scene)) {
    body['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceConf',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取单个服务
 *
 * @param request GetServiceConfRequest
 * @return GetServiceConfResponse
 */
async function getServiceConf(request: GetServiceConfRequest): GetServiceConfResponse {
  var runtime = new Util.RuntimeOptions{};
  return getServiceConfWithOptions(request, runtime);
}

model GetServiceConfigRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  serviceCode?: string(name='ServiceCode', example='nickname_detection'),
}

model GetServiceConfigResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    customServiceConf?: {
      keywordFilterLibs?: [ string ](name='KeywordFilterLibs'),
      keywordHitLibs?: [ string ](name='KeywordHitLibs'),
      similarTextHitLibs?: [ string ](name='SimilarTextHitLibs'),
    }(name='CustomServiceConf'),
    gmtModified?: string(name='GmtModified', example='2024-05-06 03:07:44'),
    resourceType?: string(name='ResourceType', example='text'),
    serviceCode?: string(name='ServiceCode', example='nickname_detection'),
    uid?: string(name='Uid', description='UID。', example='165379****31937'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetServiceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceConfigResponseBody(name='body'),
}

/**
 * @summary 获取单个服务
 *
 * @param request GetServiceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceConfigResponse
 */
async function getServiceConfigWithOptions(request: GetServiceConfigRequest, runtime: Util.RuntimeOptions): GetServiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取单个服务
 *
 * @param request GetServiceConfigRequest
 * @return GetServiceConfigResponse
 */
async function getServiceConfig(request: GetServiceConfigRequest): GetServiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getServiceConfigWithOptions(request, runtime);
}

model GetServiceLabelConfigRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  serviceCode?: string(name='ServiceCode', example='nickname_detection'),
}

model GetServiceLabelConfigResponseBody = {
  data?: [ any ](name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model GetServiceLabelConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetServiceLabelConfigResponseBody(name='body'),
}

/**
 * @summary 获取单个服务的标签配置
 *
 * @param request GetServiceLabelConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetServiceLabelConfigResponse
 */
async function getServiceLabelConfigWithOptions(request: GetServiceLabelConfigRequest, runtime: Util.RuntimeOptions): GetServiceLabelConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetServiceLabelConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取单个服务的标签配置
 *
 * @param request GetServiceLabelConfigRequest
 * @return GetServiceLabelConfigResponse
 */
async function getServiceLabelConfig(request: GetServiceLabelConfigRequest): GetServiceLabelConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return getServiceLabelConfigWithOptions(request, runtime);
}

model GetStockOssCheckTasksListRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endTime?: string(name='EndTime', example='2023-06-18 02:08:00'),
  isInc?: boolean(name='IsInc', example='false'),
  mediaType?: int32(name='MediaType', example='image'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
  startTime?: string(name='StartTime', example='2023-06-17 02:08:00'),
  taskType?: string(name='TaskType', example='batch'),
}

model GetStockOssCheckTasksListShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endTime?: string(name='EndTime', example='2023-06-18 02:08:00'),
  isInc?: boolean(name='IsInc', example='false'),
  mediaType?: int32(name='MediaType', example='image'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
  startTime?: string(name='StartTime', example='2023-06-17 02:08:00'),
  taskType?: string(name='TaskType', example='batch'),
}

model GetStockOssCheckTasksListResponseBody = {
  currentPage?: int32(name='CurrentPage', example='1'),
  items?: [ 
    {
      buckets?: string(name='Buckets', example='tmp'),
      config?: {
        callbackId?: long(name='CallbackId'),
        distinctHistoryTasks?: boolean(name='DistinctHistoryTasks', example='false'),
        endTime?: string(name='EndTime', example='2024-01-10 11:42:31'),
        executeDate?: int32(name='ExecuteDate', example='1'),
        executeTime?: string(name='ExecuteTime', example='02:00:00'),
        freeze?: boolean(name='Freeze'),
        freezeHighRisk1?: boolean(name='FreezeHighRisk1'),
        freezeHighRisk2?: boolean(name='FreezeHighRisk2'),
        freezeMediumRisk1?: boolean(name='FreezeMediumRisk1'),
        freezeMediumRisk2?: boolean(name='FreezeMediumRisk2'),
        freezeType?: string(name='FreezeType'),
        prefixFilterType?: string(name='PrefixFilterType', example='all'),
        prefixFilters?: [ string ](name='PrefixFilters'),
        priority?: int32(name='Priority', example='1'),
        scanLimit?: long(name='ScanLimit', example='10'),
        scanNoFileType?: boolean(name='ScanNoFileType', example='true'),
        scanResourceType?: int32(name='ScanResourceType', example='0'),
        scanService?: [ string ](name='ScanService'),
        scanServiceInfos?: [ 
          {
            copyFrom?: string(name='CopyFrom', example='baselineCheck'),
            isCopy?: boolean(name='IsCopy', example='false'),
            serviceCode?: string(name='ServiceCode', example='baselineCheck_01'),
            serviceName?: string(name='ServiceName'),
          }
        ](name='ScanServiceInfos'),
        startTime?: string(name='StartTime', example='2023-12-21 15:30:19'),
        taskCycle?: int32(name='TaskCycle', example='0'),
      }(name='Config'),
      endTime?: string(name='EndTime', example='2024-01-10 11:42:31'),
      finishNum?: long(name='FinishNum', example='2'),
      isInc?: boolean(name='IsInc', example='false'),
      lastExecuteDate?: string(name='LastExecuteDate', example='02:00:00'),
      mediaType?: int32(name='MediaType', example='video'),
      nextExecuteDate?: string(name='NextExecuteDate', example='02:00:00'),
      objectNum?: long(name='ObjectNum', example='10'),
      searchNum?: long(name='SearchNum', example='10'),
      startTime?: string(name='StartTime', example='2023-12-21 15:30:19'),
      status?: int32(name='Status', example='4'),
      taskId?: string(name='TaskId', example='P_XHDUS'),
      taskName?: string(name='TaskName'),
      taskType?: string(name='TaskType', example='batch'),
    }
  ](name='Items'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  totalCount?: long(name='TotalCount', example='10'),
}

model GetStockOssCheckTasksListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetStockOssCheckTasksListResponseBody(name='body'),
}

/**
 * @summary 查询oss扫描任务列表
 *
 * @param tmpReq GetStockOssCheckTasksListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetStockOssCheckTasksListResponse
 */
async function getStockOssCheckTasksListWithOptions(tmpReq: GetStockOssCheckTasksListRequest, runtime: Util.RuntimeOptions): GetStockOssCheckTasksListResponse {
  Util.validateModel(tmpReq);
  var request = new GetStockOssCheckTasksListShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.isInc)) {
    query['IsInc'] = request.isInc;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.taskType)) {
    query['TaskType'] = request.taskType;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endTime)) {
    body['EndTime'] = request.endTime;
  }
  if (!Util.isUnset(request.mediaType)) {
    body['MediaType'] = request.mediaType;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startTime)) {
    body['StartTime'] = request.startTime;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetStockOssCheckTasksList',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询oss扫描任务列表
 *
 * @param request GetStockOssCheckTasksListRequest
 * @return GetStockOssCheckTasksListResponse
 */
async function getStockOssCheckTasksList(request: GetStockOssCheckTasksListRequest): GetStockOssCheckTasksListResponse {
  var runtime = new Util.RuntimeOptions{};
  return getStockOssCheckTasksListWithOptions(request, runtime);
}

model GetTextScanResultRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  pageSize?: int32(name='PageSize', example='10'),
  query?: map[string]string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model GetTextScanResultShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  pageSize?: int32(name='PageSize', example='10'),
  queryShrink?: string(name='Query'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model GetTextScanResultResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    items?: [ 
      {
        bailianRequestId?: string(name='BailianRequestId'),
        content?: string(name='Content'),
        extFeedback?: string(name='ExtFeedback', example='miss'),
        extra?: map[string]any(name='Extra', example='{}'),
        gmtCreate?: string(name='GmtCreate', example='2023-07-11 14:21:36'),
        labels?: string(name='Labels', example='nonLabel'),
        requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
        requestTime?: string(name='RequestTime', example='2023-07-11 14:21:36'),
        result?: [ 
          {
            confidence?: float(name='Confidence', example='25.0'),
            description?: string(name='Description'),
            label?: string(name='Label', example='political_n'),
          }
        ](name='Result'),
        riskLevel?: string(name='RiskLevel'),
        scanResult?: string(name='ScanResult', example='{}'),
        score?: float(name='Score', example='20'),
        serviceCode?: string(name='ServiceCode', example='nickname_detection'),
        suggestion?: string(name='Suggestion', example='review'),
        taskId?: string(name='TaskId', example='txtwkgb******AsYNXoJswy-1Aa1Qk'),
      }
    ](name='Items'),
    pageSize?: int32(name='PageSize', example='20'),
    totalCount?: long(name='TotalCount', example='5'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetTextScanResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetTextScanResultResponseBody(name='body'),
}

/**
 * @summary 查询调用结果
 *
 * @param tmpReq GetTextScanResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetTextScanResultResponse
 */
async function getTextScanResultWithOptions(tmpReq: GetTextScanResultRequest, runtime: Util.RuntimeOptions): GetTextScanResultResponse {
  Util.validateModel(tmpReq);
  var request = new GetTextScanResultShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.query)) {
    request.queryShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.query, 'Query', 'json');
  }
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.queryShrink)) {
    body['Query'] = request.queryShrink;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetTextScanResult',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询调用结果
 *
 * @param request GetTextScanResultRequest
 * @return GetTextScanResultResponse
 */
async function getTextScanResult(request: GetTextScanResultRequest): GetTextScanResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return getTextScanResultWithOptions(request, runtime);
}

model GetUploadInfoRequest {
  name?: string(name='Name'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='image'),
}

model GetUploadInfoResponseBody = {
  accessId?: string(name='AccessId', example='LTAI5t9HM*****EXQmw3DVH'),
  code?: int32(name='Code', example='200'),
  expire?: long(name='Expire', example='900'),
  folder?: string(name='Folder', example='image/upload/xxx'),
  host?: string(name='Host', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  key?: string(name='Key', example='image/upload/xxx'),
  msg?: string(name='Msg', example='OK'),
  name?: string(name='Name'),
  policy?: string(name='Policy', example='xxxx'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  signature?: string(name='Signature', example='iyu7VHblYj+mEF9p46cdGOlNPAw='),
  success?: boolean(name='Success', example='True'),
}

model GetUploadInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUploadInfoResponseBody(name='body'),
}

/**
 * @summary 文件上传获取相应信息
 *
 * @param request GetUploadInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUploadInfoResponse
 */
async function getUploadInfoWithOptions(request: GetUploadInfoRequest, runtime: Util.RuntimeOptions): GetUploadInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetUploadInfo',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 文件上传获取相应信息
 *
 * @param request GetUploadInfoRequest
 * @return GetUploadInfoResponse
 */
async function getUploadInfo(request: GetUploadInfoRequest): GetUploadInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUploadInfoWithOptions(request, runtime);
}

model GetUserBuyStatusRequest {
  commodityCode?: string(name='CommodityCode'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model GetUserBuyStatusResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    bid?: long(name='Bid', description='Bid。', example='26842'),
    buy?: boolean(name='Buy', example='True'),
    indebt?: boolean(name='Indebt', example='False'),
    tag?: string(name='Tag'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model GetUserBuyStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetUserBuyStatusResponseBody(name='body'),
}

/**
 * @summary 获取用户购买状态
 *
 * @param request GetUserBuyStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetUserBuyStatusResponse
 */
async function getUserBuyStatusWithOptions(request: GetUserBuyStatusRequest, runtime: Util.RuntimeOptions): GetUserBuyStatusResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.commodityCode)) {
    body['CommodityCode'] = request.commodityCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'GetUserBuyStatus',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取用户购买状态
 *
 * @param request GetUserBuyStatusRequest
 * @return GetUserBuyStatusResponse
 */
async function getUserBuyStatus(request: GetUserBuyStatusRequest): GetUserBuyStatusResponse {
  var runtime = new Util.RuntimeOptions{};
  return getUserBuyStatusWithOptions(request, runtime);
}

model ListAnswerLibRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model ListAnswerLibResponseBody = {
  data?: [ 
    {
      answerCount?: int32(name='AnswerCount', example='100'),
      gmtModified?: string(name='GmtModified', example='2024-06-03 18:15:01'),
      libId?: string(name='LibId', example='alxxx'),
      libName?: string(name='LibName'),
      uid?: string(name='Uid', description='UID。', example='1643953****74290'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model ListAnswerLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListAnswerLibResponseBody(name='body'),
}

/**
 * @summary 代答库列表
 *
 * @param request ListAnswerLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListAnswerLibResponse
 */
async function listAnswerLibWithOptions(request: ListAnswerLibRequest, runtime: Util.RuntimeOptions): ListAnswerLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListAnswerLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 代答库列表
 *
 * @param request ListAnswerLibRequest
 * @return ListAnswerLibResponse
 */
async function listAnswerLib(request: ListAnswerLibRequest): ListAnswerLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return listAnswerLibWithOptions(request, runtime);
}

model ListCallbackRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model ListCallbackResponseBody = {
  data?: [ 
    {
      cryptType?: string(name='CryptType', example='SHA256'),
      gmtCreate?: string(name='GmtCreate', example='2024-06-03 15:20:14'),
      gmtModified?: string(name='GmtModified', example='2024-06-03 15:20:14'),
      id?: long(name='Id', example='11234'),
      name?: string(name='Name'),
      scope?: string(name='Scope', example='all'),
      seed?: string(name='Seed', description='Seed。', example='cbupVnpBjkgjFxfINMHKkrHS-1zZPUm'),
      uid?: string(name='Uid', description='UID。', example='16537*****831937'),
      url?: string(name='Url', example='https://console.aliyun.com/'),
    }
  ](name='Data'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model ListCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCallbackResponseBody(name='body'),
}

/**
 * @summary 消息通知列表
 *
 * @param request ListCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCallbackResponse
 */
async function listCallbackWithOptions(request: ListCallbackRequest, runtime: Util.RuntimeOptions): ListCallbackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListCallback',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 消息通知列表
 *
 * @param request ListCallbackRequest
 * @return ListCallbackResponse
 */
async function listCallback(request: ListCallbackRequest): ListCallbackResponse {
  var runtime = new Util.RuntimeOptions{};
  return listCallbackWithOptions(request, runtime);
}

model ListImageLibRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model ListImageLibResponseBody = {
  code?: int32(name='Code', example='200'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  libList?: [ 
    {
      comment?: string(name='Comment'),
      freeInspection?: int32(name='FreeInspection', example='1'),
      gmtCreate?: string(name='GmtCreate', example='2024-06-03 15:20:14'),
      gmtModified?: string(name='GmtModified', example='2024-06-03 15:20:14'),
      imageNum?: long(name='ImageNum', example='1'),
      libId?: string(name='LibId', example='custom_xxxx'),
      libName?: string(name='LibName'),
    }
  ](name='LibList'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ListImageLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListImageLibResponseBody(name='body'),
}

/**
 * @summary 图库列表
 *
 * @param request ListImageLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListImageLibResponse
 */
async function listImageLibWithOptions(request: ListImageLibRequest, runtime: Util.RuntimeOptions): ListImageLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListImageLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 图库列表
 *
 * @param request ListImageLibRequest
 * @return ListImageLibResponse
 */
async function listImageLib(request: ListImageLibRequest): ListImageLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return listImageLibWithOptions(request, runtime);
}

model ListImagesFromLibRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  imgId?: string(name='ImgId', example='112'),
  libId?: string(name='LibId', example='custom_xxxx'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model ListImagesFromLibShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  imgId?: string(name='ImgId', example='112'),
  libId?: string(name='LibId', example='custom_xxxx'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
}

model ListImagesFromLibResponseBody = {
  code?: int32(name='Code', example='200'),
  currentPage?: int32(name='CurrentPage', example='1'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  items?: [ 
    {
      gmtCreate?: string(name='GmtCreate', example='2022-11-30 16:30:29'),
      imageId?: string(name='ImageId', example='112'),
      imageUrl?: string(name='ImageUrl', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/image/upload/IMG_2123.jpg'),
      thumbnailUrl?: string(name='ThumbnailUrl', example='https://oss-cip-shanghai.oss-cn-shanghai.aliyuncs.com/image/upload/IMG_2123.jpg'),
    }
  ](name='Items'),
  msg?: string(name='Msg', example='OK'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
  totalCount?: int32(name='TotalCount', example='10'),
}

model ListImagesFromLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListImagesFromLibResponseBody(name='body'),
}

/**
 * @summary 图片列表 分页
 *
 * @param tmpReq ListImagesFromLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListImagesFromLibResponse
 */
async function listImagesFromLibWithOptions(tmpReq: ListImagesFromLibRequest, runtime: Util.RuntimeOptions): ListImagesFromLibResponse {
  Util.validateModel(tmpReq);
  var request = new ListImagesFromLibShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    body['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.imgId)) {
    body['ImgId'] = request.imgId;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    body['StartDate'] = request.startDate;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListImagesFromLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 图片列表 分页
 *
 * @param request ListImagesFromLibRequest
 * @return ListImagesFromLibResponse
 */
async function listImagesFromLib(request: ListImagesFromLibRequest): ListImagesFromLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return listImagesFromLibWithOptions(request, runtime);
}

model ListKeywordLibsRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model ListKeywordLibsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: [ 
    {
      gmtModified?: string(name='GmtModified', example='2022-11-30 16:30:29'),
      keywordCount?: string(name='KeywordCount', example='10'),
      libId?: string(name='LibId', example='custom_xxxxx'),
      libName?: string(name='LibName'),
      serviceCodes?: string(name='ServiceCodes'),
      uid?: string(name='Uid', description='UID。', example='19964*****086772'),
    }
  ](name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ListKeywordLibsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListKeywordLibsResponseBody(name='body'),
}

/**
 * @summary 关键词库列表
 *
 * @param request ListKeywordLibsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListKeywordLibsResponse
 */
async function listKeywordLibsWithOptions(request: ListKeywordLibsRequest, runtime: Util.RuntimeOptions): ListKeywordLibsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListKeywordLibs',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 关键词库列表
 *
 * @param request ListKeywordLibsRequest
 * @return ListKeywordLibsResponse
 */
async function listKeywordLibs(request: ListKeywordLibsRequest): ListKeywordLibsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listKeywordLibsWithOptions(request, runtime);
}

model ListKeywordsRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  libId?: string(name='LibId', example='custom_xxxx'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
  word?: string(name='Word'),
}

model ListKeywordsShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  libId?: string(name='LibId', example='custom_xxxx'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
  word?: string(name='Word'),
}

model ListKeywordsResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: {
    currentPage?: int32(name='CurrentPage', example='1'),
    items?: [ 
      {
        gmtCreate?: string(name='GmtCreate', example='2023-06-03 14:43:03'),
        gmtModified?: string(name='GmtModified', example='2023-06-03 14:43:03'),
        id?: long(name='Id', example='112'),
        keywordLibId?: string(name='KeywordLibId', example='custom_xxxx'),
        keywordMd5Id?: long(name='KeywordMd5Id', example='4205334'),
        word?: string(name='Word'),
      }
    ](name='Items'),
    pageSize?: int32(name='PageSize', example='20'),
    totalCount?: int32(name='TotalCount', example='23'),
  }(name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ListKeywordsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListKeywordsResponseBody(name='body'),
}

/**
 * @summary 查询关键词列表
 *
 * @param tmpReq ListKeywordsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListKeywordsResponse
 */
async function listKeywordsWithOptions(tmpReq: ListKeywordsRequest, runtime: Util.RuntimeOptions): ListKeywordsResponse {
  Util.validateModel(tmpReq);
  var request = new ListKeywordsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.sortShrink)) {
    body['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.word)) {
    body['Word'] = request.word;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListKeywords',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询关键词列表
 *
 * @param request ListKeywordsRequest
 * @return ListKeywordsResponse
 */
async function listKeywords(request: ListKeywordsRequest): ListKeywordsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listKeywordsWithOptions(request, runtime);
}

model ListOssCheckResultRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  finishNum?: long(name='FinishNum', example='2'),
  pageSize?: int32(name='PageSize', example='10'),
  query?: string(name='Query', example='{"TaskId":"P_11TL5T"}'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
  status?: int32(name='Status', example='4'),
}

model ListOssCheckResultShrinkRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  endDate?: string(name='EndDate', example='2023-08-24 10:01:55'),
  finishNum?: long(name='FinishNum', example='2'),
  pageSize?: int32(name='PageSize', example='10'),
  query?: string(name='Query', example='{"TaskId":"P_11TL5T"}'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
  startDate?: string(name='StartDate', example='2023-08-11 09:00:19'),
  status?: int32(name='Status', example='4'),
}

model ListOssCheckResultResponseBody = {
  currentPage?: int32(name='CurrentPage', example='1'),
  items?: [ 
    {
      bucket?: string(name='Bucket', example='tmp'),
      code?: string(name='Code', example='200'),
      contentType?: string(name='ContentType', example='audio'),
      copyFrom?: string(name='CopyFrom', example='audio_media_detection'),
      freezeStatus?: string(name='FreezeStatus'),
      freezeType?: string(name='FreezeType'),
      imageUrl?: string(name='ImageUrl', example='http://www.aliyuncs.com/test.jpg'),
      isCopy?: boolean(name='IsCopy', example='true'),
      jobName?: string(name='JobName', example='dhT20X2310'),
      labels?: [ string ](name='Labels'),
      labels2?: [ string ](name='Labels2'),
      md5?: string(name='Md5', example='54416c9b159df4a60ae03c04ccb94cb5'),
      msg?: string(name='Msg', example='OK'),
      object?: string(name='Object', example='1713014531569_958.png.jpeg'),
      riskLevel?: string(name='RiskLevel'),
      riskLevel0?: string(name='RiskLevel0'),
      riskLevel2?: string(name='RiskLevel2'),
      scanResult?: string(name='ScanResult', example='{}'),
      serviceCode?: string(name='ServiceCode', example='audio_media_detection_01'),
      serviceName?: string(name='ServiceName'),
      taskId?: string(name='TaskId', example='EP6TI7_au_Zo25ITvCbkocNuF801QOQX'),
      url?: string(name='Url', example='http://www.aliyuncs.com/test.mp3'),
    }
  ](name='Items'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  totalCount?: long(name='TotalCount', example='13'),
}

model ListOssCheckResultResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListOssCheckResultResponseBody(name='body'),
}

/**
 * @summary oss扫描结果查询
 *
 * @param tmpReq ListOssCheckResultRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListOssCheckResultResponse
 */
async function listOssCheckResultWithOptions(tmpReq: ListOssCheckResultRequest, runtime: Util.RuntimeOptions): ListOssCheckResultResponse {
  Util.validateModel(tmpReq);
  var request = new ListOssCheckResultShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.endDate)) {
    query['EndDate'] = request.endDate;
  }
  if (!Util.isUnset(request.finishNum)) {
    query['FinishNum'] = request.finishNum;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.query)) {
    query['Query'] = request.query;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.sortShrink)) {
    query['Sort'] = request.sortShrink;
  }
  if (!Util.isUnset(request.startDate)) {
    query['StartDate'] = request.startDate;
  }
  if (!Util.isUnset(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ListOssCheckResult',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary oss扫描结果查询
 *
 * @param request ListOssCheckResultRequest
 * @return ListOssCheckResultResponse
 */
async function listOssCheckResult(request: ListOssCheckResultRequest): ListOssCheckResultResponse {
  var runtime = new Util.RuntimeOptions{};
  return listOssCheckResultWithOptions(request, runtime);
}

model ListServiceConfigsRequest {
  classify?: string(name='Classify'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
  useStatus?: string(name='UseStatus'),
}

model ListServiceConfigsResponseBody = {
  code?: int32(name='Code', example='400'),
  data?: [ 
    {
      classify?: string(name='Classify'),
      copyFrom?: string(name='CopyFrom', example='nickname_detection'),
      customServiceConf?: {
        audioService?: string(name='AudioService', example='audio_media_detection'),
        imageService?: [ string ](name='ImageService'),
        keywordFilterLibs?: [ string ](name='KeywordFilterLibs'),
        keywordHitLibs?: [ string ](name='KeywordHitLibs'),
        rules?: [ 
          {
            imageScanRule?: {
              services?: [ string ](name='Services'),
            }(name='ImageScanRule'),
            index?: int32(name='Index', example='1'),
            textScanRule?: {
              services?: [ string ](name='Services'),
            }(name='TextScanRule'),
          }
        ](name='Rules'),
        similarTextHitLibs?: [ string ](name='SimilarTextHitLibs'),
      }(name='CustomServiceConf'),
      gmtModified?: string(name='GmtModified', example='2023-07-11 15:40:04'),
      option?: map[string]any(name='Option', example='{}'),
      resourceType?: string(name='ResourceType', example='text'),
      serviceCode?: string(name='ServiceCode', example='nickname_detection'),
      serviceDesc?: string(name='ServiceDesc'),
      serviceName?: string(name='ServiceName'),
      serviceType?: string(name='ServiceType', example='plus'),
      uid?: string(name='Uid', description='UID。', example='1674*****0071291'),
      useStatus?: string(name='UseStatus'),
    }
  ](name='Data'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model ListServiceConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListServiceConfigsResponseBody(name='body'),
}

/**
 * @summary 获取服务列表
 *
 * @param request ListServiceConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListServiceConfigsResponse
 */
async function listServiceConfigsWithOptions(request: ListServiceConfigsRequest, runtime: Util.RuntimeOptions): ListServiceConfigsResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.classify)) {
    query['Classify'] = request.classify;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.useStatus)) {
    query['UseStatus'] = request.useStatus;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ListServiceConfigs',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 获取服务列表
 *
 * @param request ListServiceConfigsRequest
 * @return ListServiceConfigsResponse
 */
async function listServiceConfigs(request: ListServiceConfigsRequest): ListServiceConfigsResponse {
  var runtime = new Util.RuntimeOptions{};
  return listServiceConfigsWithOptions(request, runtime);
}

model ModifyAnswerLibRequest {
  libId?: string(name='LibId', example='custom_xxxx'),
  libName?: string(name='LibName'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model ModifyAnswerLibResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model ModifyAnswerLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyAnswerLibResponseBody(name='body'),
}

/**
 * @summary 更新代答库
 *
 * @param request ModifyAnswerLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyAnswerLibResponse
 */
async function modifyAnswerLibWithOptions(request: ModifyAnswerLibRequest, runtime: Util.RuntimeOptions): ModifyAnswerLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.libId)) {
    query['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.libName)) {
    query['LibName'] = request.libName;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'ModifyAnswerLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新代答库
 *
 * @param request ModifyAnswerLibRequest
 * @return ModifyAnswerLibResponse
 */
async function modifyAnswerLib(request: ModifyAnswerLibRequest): ModifyAnswerLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyAnswerLibWithOptions(request, runtime);
}

model ModifyCallbackRequest {
  cryptType?: string(name='CryptType', example='SHA256'),
  id?: long(name='Id', description='This parameter is required.', example='112'),
  name?: string(name='Name'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  scope?: string(name='Scope', example='all'),
  url?: string(name='Url', example='https://www.aliyuncs.com'),
}

model ModifyCallbackResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model ModifyCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyCallbackResponseBody(name='body'),
}

/**
 * @summary 修改消息通知
 *
 * @param request ModifyCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyCallbackResponse
 */
async function modifyCallbackWithOptions(request: ModifyCallbackRequest, runtime: Util.RuntimeOptions): ModifyCallbackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.cryptType)) {
    body['CryptType'] = request.cryptType;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  if (!Util.isUnset(request.name)) {
    body['Name'] = request.name;
  }
  if (!Util.isUnset(request.scope)) {
    body['Scope'] = request.scope;
  }
  if (!Util.isUnset(request.url)) {
    body['Url'] = request.url;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyCallback',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 修改消息通知
 *
 * @param request ModifyCallbackRequest
 * @return ModifyCallbackResponse
 */
async function modifyCallback(request: ModifyCallbackRequest): ModifyCallbackResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyCallbackWithOptions(request, runtime);
}

model ModifyFeatureConfigRequest {
  config?: string(name='Config', description='Configuration, in JSON format', example='{}'),
  description?: string(name='Description', description='Label meaning', example='标签2'),
  field?: string(name='Field', description='Label value, customer-defined', example='__config__'),
  regionId?: string(name='RegionId', description='Region', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', description='Resource type.', example='text'),
  serviceCode?: string(name='ServiceCode', description='Service code.', example='llm_query_moderation'),
  type?: string(name='Type', description='Type', example='custom_llm_template'),
}

model ModifyFeatureConfigResponseBody = {
  code?: int32(name='Code', description='Status code.', example='200'),
  data?: boolean(name='Data', description='Returned data', example='True'),
  httpStatusCode?: int32(name='HttpStatusCode', description='HTTP status code.', example='200'),
  msg?: string(name='Msg', description='Response message of this request.', example='success'),
  requestId?: string(name='RequestId', description='ID assigned by the backend to uniquely identify a request. Can be used for troubleshooting.', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', description='Success indicator.', example='True'),
}

model ModifyFeatureConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyFeatureConfigResponseBody(name='body'),
}

/**
 * @summary Save Feature Configuration
 *
 * @param request ModifyFeatureConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyFeatureConfigResponse
 */
async function modifyFeatureConfigWithOptions(request: ModifyFeatureConfigRequest, runtime: Util.RuntimeOptions): ModifyFeatureConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.config)) {
    body['Config'] = request.config;
  }
  if (!Util.isUnset(request.description)) {
    body['Description'] = request.description;
  }
  if (!Util.isUnset(request.field)) {
    body['Field'] = request.field;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.type)) {
    body['Type'] = request.type;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyFeatureConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary Save Feature Configuration
 *
 * @param request ModifyFeatureConfigRequest
 * @return ModifyFeatureConfigResponse
 */
async function modifyFeatureConfig(request: ModifyFeatureConfigRequest): ModifyFeatureConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyFeatureConfigWithOptions(request, runtime);
}

model ModifyServiceInfoRequest {
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='image'),
  serviceCode?: string(name='ServiceCode', example='baselineCheck'),
  serviceDesc?: string(name='ServiceDesc'),
  serviceName?: string(name='ServiceName'),
}

model ModifyServiceInfoResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model ModifyServiceInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyServiceInfoResponseBody(name='body'),
}

/**
 * @summary 编辑服务
 *
 * @param request ModifyServiceInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyServiceInfoResponse
 */
async function modifyServiceInfoWithOptions(request: ModifyServiceInfoRequest, runtime: Util.RuntimeOptions): ModifyServiceInfoResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.serviceDesc)) {
    body['ServiceDesc'] = request.serviceDesc;
  }
  if (!Util.isUnset(request.serviceName)) {
    body['ServiceName'] = request.serviceName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'ModifyServiceInfo',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑服务
 *
 * @param request ModifyServiceInfoRequest
 * @return ModifyServiceInfoResponse
 */
async function modifyServiceInfo(request: ModifyServiceInfoRequest): ModifyServiceInfoResponse {
  var runtime = new Util.RuntimeOptions{};
  return modifyServiceInfoWithOptions(request, runtime);
}

model QueryAnswerSampleByPageRequest {
  answer?: string(name='Answer'),
  currentPage?: int32(name='CurrentPage', example='1'),
  libId?: string(name='LibId', example='custom_xxxx'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sort?: map[string]string(name='Sort'),
}

model QueryAnswerSampleByPageShrinkRequest {
  answer?: string(name='Answer'),
  currentPage?: int32(name='CurrentPage', example='1'),
  libId?: string(name='LibId', example='custom_xxxx'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  sortShrink?: string(name='Sort'),
}

model QueryAnswerSampleByPageResponseBody = {
  currentPage?: int32(name='CurrentPage', example='1'),
  items?: [ 
    {
      answer?: string(name='Answer'),
      gmtCreate?: string(name='GmtCreate', example='2023-07-31 06:16:06'),
      id?: long(name='Id', example='1666'),
      libId?: string(name='LibId', example='custom_xxxx'),
      uid?: string(name='Uid', description='UID。', example='104813*****2399'),
    }
  ](name='Items'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  totalCount?: long(name='TotalCount', example='58'),
}

model QueryAnswerSampleByPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryAnswerSampleByPageResponseBody(name='body'),
}

/**
 * @summary 分页查询代答样本
 *
 * @param tmpReq QueryAnswerSampleByPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryAnswerSampleByPageResponse
 */
async function queryAnswerSampleByPageWithOptions(tmpReq: QueryAnswerSampleByPageRequest, runtime: Util.RuntimeOptions): QueryAnswerSampleByPageResponse {
  Util.validateModel(tmpReq);
  var request = new QueryAnswerSampleByPageShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.sort)) {
    request.sortShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.sort, 'Sort', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.answer)) {
    query['Answer'] = request.answer;
  }
  if (!Util.isUnset(request.currentPage)) {
    query['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.libId)) {
    query['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.sortShrink)) {
    query['Sort'] = request.sortShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'QueryAnswerSampleByPage',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 分页查询代答样本
 *
 * @param request QueryAnswerSampleByPageRequest
 * @return QueryAnswerSampleByPageResponse
 */
async function queryAnswerSampleByPage(request: QueryAnswerSampleByPageRequest): QueryAnswerSampleByPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryAnswerSampleByPageWithOptions(request, runtime);
}

model QueryCallbackRequest {
  checkForOss?: boolean(name='CheckForOss', example='true'),
  id?: long(name='Id', description='This parameter is required.', example='11234'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model QueryCallbackResponseBody = {
  cryptType?: string(name='CryptType', example='SHA256'),
  existsOssCheckTask?: boolean(name='ExistsOssCheckTask', example='false'),
  gmtCreate?: string(name='GmtCreate', example='2022-11-30 16:30:29'),
  gmtModified?: string(name='GmtModified', example='2024-06-03 15:20:14'),
  id?: long(name='Id', example='11234'),
  name?: string(name='Name'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  scope?: string(name='Scope', example='all'),
  seed?: string(name='Seed', description='Seed。', example='cb2MysbJTAAIf6gB3u4vpIEU-1ySnnf'),
  uid?: string(name='Uid', description='UID。', example='19964*****086772'),
  url?: string(name='Url', example='https://www.aliyuncs.com'),
}

model QueryCallbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryCallbackResponseBody(name='body'),
}

/**
 * @summary 查询单个回调配置
 *
 * @param request QueryCallbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryCallbackResponse
 */
async function queryCallbackWithOptions(request: QueryCallbackRequest, runtime: Util.RuntimeOptions): QueryCallbackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.checkForOss)) {
    body['CheckForOss'] = request.checkForOss;
  }
  if (!Util.isUnset(request.id)) {
    body['Id'] = request.id;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryCallback',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 查询单个回调配置
 *
 * @param request QueryCallbackRequest
 * @return QueryCallbackResponse
 */
async function queryCallback(request: QueryCallbackRequest): QueryCallbackResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCallbackWithOptions(request, runtime);
}

model QueryCallbackByPageRequest {
  currentPage?: int32(name='CurrentPage', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model QueryCallbackByPageResponseBody = {
  currentPage?: int32(name='CurrentPage', example='1'),
  items?: [ 
    {
      cryptType?: string(name='CryptType', example='SHA256'),
      gmtCreate?: string(name='GmtCreate', example='2024-06-03 15:20:14'),
      gmtModified?: string(name='GmtModified', example='2024-06-03 15:20:14'),
      id?: long(name='Id', example='1697'),
      name?: string(name='Name'),
      scope?: string(name='Scope', example='all'),
      seed?: string(name='Seed', description='Seed。', example='cb6gYS8GXj4Vn4Y4FN0Y8R5M-1x46Mq'),
      uid?: string(name='Uid', description='UID。', example='12161*****398900'),
      url?: string(name='Url', example='https://console.aliyun.com/'),
    }
  ](name='Items'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  totalCount?: long(name='TotalCount', example='10'),
}

model QueryCallbackByPageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryCallbackByPageResponseBody(name='body'),
}

/**
 * @summary 消息通知
 *
 * @param request QueryCallbackByPageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryCallbackByPageResponse
 */
async function queryCallbackByPageWithOptions(request: QueryCallbackByPageRequest, runtime: Util.RuntimeOptions): QueryCallbackByPageResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.currentPage)) {
    body['CurrentPage'] = request.currentPage;
  }
  if (!Util.isUnset(request.pageSize)) {
    body['PageSize'] = request.pageSize;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'QueryCallbackByPage',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 消息通知
 *
 * @param request QueryCallbackByPageRequest
 * @return QueryCallbackByPageResponse
 */
async function queryCallbackByPage(request: QueryCallbackByPageRequest): QueryCallbackByPageResponse {
  var runtime = new Util.RuntimeOptions{};
  return queryCallbackByPageWithOptions(request, runtime);
}

model UpdateBackupConfigRequest {
  backupConfig?: string(name='BackupConfig', example='{}'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='video'),
  serviceCode?: string(name='ServiceCode', example='videoDetection'),
}

model UpdateBackupConfigResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model UpdateBackupConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateBackupConfigResponseBody(name='body'),
}

/**
 * @summary 更新证据转存配置
 *
 * @param request UpdateBackupConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateBackupConfigResponse
 */
async function updateBackupConfigWithOptions(request: UpdateBackupConfigRequest, runtime: Util.RuntimeOptions): UpdateBackupConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.backupConfig)) {
    query['BackupConfig'] = request.backupConfig;
  }
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  if (!Util.isUnset(request.resourceType)) {
    query['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.serviceCode)) {
    query['ServiceCode'] = request.serviceCode;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApi.Params{
    action = 'UpdateBackupConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新证据转存配置
 *
 * @param request UpdateBackupConfigRequest
 * @return UpdateBackupConfigResponse
 */
async function updateBackupConfig(request: UpdateBackupConfigRequest): UpdateBackupConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateBackupConfigWithOptions(request, runtime);
}

model UpdateImageLibRequest {
  comment?: string(name='Comment'),
  freeInspection?: int32(name='FreeInspection', example='0'),
  libId?: string(name='LibId', example='custom_xxxx'),
  libName?: string(name='LibName'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model UpdateImageLibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model UpdateImageLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateImageLibResponseBody(name='body'),
}

/**
 * @summary 编辑图库
 *
 * @param request UpdateImageLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateImageLibResponse
 */
async function updateImageLibWithOptions(request: UpdateImageLibRequest, runtime: Util.RuntimeOptions): UpdateImageLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.comment)) {
    body['Comment'] = request.comment;
  }
  if (!Util.isUnset(request.freeInspection)) {
    body['FreeInspection'] = request.freeInspection;
  }
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.libName)) {
    body['LibName'] = request.libName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateImageLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑图库
 *
 * @param request UpdateImageLibRequest
 * @return UpdateImageLibResponse
 */
async function updateImageLib(request: UpdateImageLibRequest): UpdateImageLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateImageLibWithOptions(request, runtime);
}

model UpdateImageLibFreeInspectionRequest {
  config?: map[string]int32(name='Config'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model UpdateImageLibFreeInspectionShrinkRequest {
  configShrink?: string(name='Config'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model UpdateImageLibFreeInspectionResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model UpdateImageLibFreeInspectionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateImageLibFreeInspectionResponseBody(name='body'),
}

/**
 * @summary 编辑图库免检配置
 *
 * @param tmpReq UpdateImageLibFreeInspectionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateImageLibFreeInspectionResponse
 */
async function updateImageLibFreeInspectionWithOptions(tmpReq: UpdateImageLibFreeInspectionRequest, runtime: Util.RuntimeOptions): UpdateImageLibFreeInspectionResponse {
  Util.validateModel(tmpReq);
  var request = new UpdateImageLibFreeInspectionShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!Util.isUnset(tmpReq.config)) {
    request.configShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.config, 'Config', 'json');
  }
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.configShrink)) {
    body['Config'] = request.configShrink;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateImageLibFreeInspection',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑图库免检配置
 *
 * @param request UpdateImageLibFreeInspectionRequest
 * @return UpdateImageLibFreeInspectionResponse
 */
async function updateImageLibFreeInspection(request: UpdateImageLibFreeInspectionRequest): UpdateImageLibFreeInspectionResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateImageLibFreeInspectionWithOptions(request, runtime);
}

model UpdateKeywordLibRequest {
  libId?: string(name='LibId', example='custom_xxxx'),
  libName?: string(name='LibName'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
}

model UpdateKeywordLibResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model UpdateKeywordLibResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateKeywordLibResponseBody(name='body'),
}

/**
 * @summary 编辑关键词库
 *
 * @param request UpdateKeywordLibRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateKeywordLibResponse
 */
async function updateKeywordLibWithOptions(request: UpdateKeywordLibRequest, runtime: Util.RuntimeOptions): UpdateKeywordLibResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.libId)) {
    body['LibId'] = request.libId;
  }
  if (!Util.isUnset(request.libName)) {
    body['LibName'] = request.libName;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateKeywordLib',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 编辑关键词库
 *
 * @param request UpdateKeywordLibRequest
 * @return UpdateKeywordLibResponse
 */
async function updateKeywordLib(request: UpdateKeywordLibRequest): UpdateKeywordLibResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateKeywordLibWithOptions(request, runtime);
}

model UpdateScanResultFeedbackRequest {
  feedback?: string(name='Feedback', example='missOut'),
  queryRequestId?: string(name='QueryRequestId', example='46232656-984E-****-A648-B1D0667B6C3E'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='text'),
}

model UpdateScanResultFeedbackResponseBody = {
  data?: boolean(name='Data', example='True'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
}

model UpdateScanResultFeedbackResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateScanResultFeedbackResponseBody(name='body'),
}

/**
 * @summary 检测结果反馈
 *
 * @param request UpdateScanResultFeedbackRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateScanResultFeedbackResponse
 */
async function updateScanResultFeedbackWithOptions(request: UpdateScanResultFeedbackRequest, runtime: Util.RuntimeOptions): UpdateScanResultFeedbackResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.feedback)) {
    body['Feedback'] = request.feedback;
  }
  if (!Util.isUnset(request.queryRequestId)) {
    body['QueryRequestId'] = request.queryRequestId;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateScanResultFeedback',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 检测结果反馈
 *
 * @param request UpdateScanResultFeedbackRequest
 * @return UpdateScanResultFeedbackResponse
 */
async function updateScanResultFeedback(request: UpdateScanResultFeedbackRequest): UpdateScanResultFeedbackResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateScanResultFeedbackWithOptions(request, runtime);
}

model UpdateServiceConfigRequest {
  fileConfig?: string(name='FileConfig', example='{}'),
  keywordFilterLibs?: string(name='KeywordFilterLibs', example='[]'),
  keywordHitLibs?: string(name='KeywordHitLibs', example='[]'),
  regionId?: string(name='RegionId', example='cn-shanghai'),
  resourceType?: string(name='ResourceType', example='image'),
  scene?: string(name='Scene', example='pornographic'),
  sceneConfig?: string(name='SceneConfig', example='{}'),
  serviceCode?: string(name='ServiceCode', example='baselineCheck'),
  videoConfig?: string(name='VideoConfig', example='{}'),
}

model UpdateServiceConfigResponseBody = {
  code?: int32(name='Code', example='200'),
  data?: boolean(name='Data', example='True'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  msg?: string(name='Msg', example='OK'),
  requestId?: string(name='RequestId', example='AAAAAA-BBBB-CCCCC-DDDD-EEEEEEEE****'),
  success?: boolean(name='Success', example='True'),
}

model UpdateServiceConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateServiceConfigResponseBody(name='body'),
}

/**
 * @summary 更新服务
 *
 * @param request UpdateServiceConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateServiceConfigResponse
 */
async function updateServiceConfigWithOptions(request: UpdateServiceConfigRequest, runtime: Util.RuntimeOptions): UpdateServiceConfigResponse {
  Util.validateModel(request);
  var query = {};
  if (!Util.isUnset(request.regionId)) {
    query['RegionId'] = request.regionId;
  }
  var body : map[string]any = {};
  if (!Util.isUnset(request.fileConfig)) {
    body['FileConfig'] = request.fileConfig;
  }
  if (!Util.isUnset(request.keywordFilterLibs)) {
    body['KeywordFilterLibs'] = request.keywordFilterLibs;
  }
  if (!Util.isUnset(request.keywordHitLibs)) {
    body['KeywordHitLibs'] = request.keywordHitLibs;
  }
  if (!Util.isUnset(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!Util.isUnset(request.scene)) {
    body['Scene'] = request.scene;
  }
  if (!Util.isUnset(request.sceneConfig)) {
    body['SceneConfig'] = request.sceneConfig;
  }
  if (!Util.isUnset(request.serviceCode)) {
    body['ServiceCode'] = request.serviceCode;
  }
  if (!Util.isUnset(request.videoConfig)) {
    body['VideoConfig'] = request.videoConfig;
  }
  var req = new OpenApi.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApi.Params{
    action = 'UpdateServiceConfig',
    version = '2022-09-26',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  return callApi(params, req, runtime);
}

/**
 * @summary 更新服务
 *
 * @param request UpdateServiceConfigRequest
 * @return UpdateServiceConfigResponse
 */
async function updateServiceConfig(request: UpdateServiceConfigRequest): UpdateServiceConfigResponse {
  var runtime = new Util.RuntimeOptions{};
  return updateServiceConfigWithOptions(request, runtime);
}

